:root {
    --login-blue: #2478df;
    --login-blue-dark: #1767ca;
    --login-ink: #182235;
    --login-subtle: #768398;
    --login-border: #dce3ed;
}

html, body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

* { box-sizing: border-box; }

/* 登录页保持原始比例，覆盖后台主框架的 90% 缩放，并允许矮屏滚动。 */
html.ea-main-frame {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body, html.ea-main-frame body {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    zoom: 1;
    color: var(--login-ink);
    background: #061d4d center / cover no-repeat fixed;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    background:
        radial-gradient(circle at 50% 46%, rgba(0, 126, 255, .22), transparent 36%),
        linear-gradient(180deg, rgba(2, 20, 58, .2), rgba(2, 16, 49, .58));
    pointer-events: none;
    content: "";
}

body::after {
    position: fixed;
    z-index: 0;
    inset: 0;
    background-image: radial-gradient(circle, rgba(91, 175, 255, .48) 0 1px, transparent 1.5px);
    background-position: 0 0;
    background-size: 112px 94px;
    opacity: .12;
    pointer-events: none;
    content: "";
}

.layui-hide { display: none !important; }

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-rows: 1fr auto;
}

.login-stage {
    display: grid;
    width: 100%;
    padding: 40px 32px 28px;
    align-items: center;
    justify-items: center;
}

.login-card {
    display: grid;
    width: min(1120px, 100%);
    min-height: 640px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 13, 43, .4), 0 4px 18px rgba(0, 14, 46, .18);
    grid-template-columns: 1fr 1fr;
}

.login-visual {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    background-color: #123d86;
    background-image: var(--login-background-image, linear-gradient(135deg, #123d86, #0bb5eb));
    background-position: center 18%;
    background-size: auto 155%;
}

.login-visual::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 30, 78, .96), rgba(7, 91, 173, .86) 55%, rgba(3, 24, 65, .96));
    content: "";
}

.login-visual::after {
    position: absolute;
    z-index: 0;
    right: -150px;
    bottom: -180px;
    width: 580px;
    height: 580px;
    border: 1px solid rgba(142, 221, 255, .22);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(35, 178, 255, .05), 0 0 0 52px rgba(35, 178, 255, .04);
    content: "";
}

.visual-overlay { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(4, 24, 66, .34), rgba(4, 40, 94, .16)); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.visual-content { position: relative; z-index: 2; display: flex; height: 100%; min-height: 640px; padding: 46px 50px 43px; flex-direction: column; }

.visual-brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; width: 47px; height: 47px; flex: 0 0 47px; place-items: center; }
.brand-mark img { display: block; width: 47px; height: 47px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.15)); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.brand-copy strong { overflow: hidden; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy span { color: rgba(229, 247, 255, .75); font-size: 11px; letter-spacing: .1em; }

.visual-utility { display: flex; margin-top: 62px; padding-left: 16px; border-left: 2px solid rgba(126, 231, 255, .8); flex-direction: column; gap: 7px; }
.visual-utility span { color: #8ceaff; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.visual-utility strong { color: rgba(244, 252, 255, .92); font-size: 16px; font-weight: 500; letter-spacing: .04em; }

.visual-copy { margin-top: 52px; margin-bottom: 0; padding: 0; }
.visual-copy h1 { margin: 22px 0 16px; color: #fff; font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: clamp(32px, 3vw, 43px); font-weight: 600; letter-spacing: .015em; line-height: 1.34; text-shadow: 0 4px 22px rgba(0, 23, 72, .24); }
.visual-copy h1 em { display: block; color: #b9edff; font-style: normal; white-space: nowrap; }
.visual-copy p { margin: 0; color: rgba(232, 246, 255, .82); font-size: 14px; letter-spacing: .05em; }

.visual-assurance { display: flex; margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(195, 239, 255, .24); align-items: center; gap: 26px; }
.visual-assurance span { display: inline-flex; align-items: center; gap: 7px; color: rgba(228, 247, 255, .78); font-size: 11px; white-space: nowrap; }
.visual-assurance i { color: #8eeaff; font-size: 12px; }

.login-panel { display: flex; min-width: 0; padding: 52px 58px 36px; flex-direction: column; justify-content: center; background: #fff; }
.panel-heading { width: min(100%, 384px); margin: 0 auto 30px; }
.panel-heading h1 { margin: 0; color: #152137; font-size: 30px; font-weight: 600; letter-spacing: .02em; line-height: 1.4; }
.panel-heading p { margin: 8px 0 0; color: var(--login-subtle); font-size: 14px; line-height: 1.7; }
.login-bottom { width: min(100%, 384px); margin: 0 auto; }
.login-bottom .center { display: grid; gap: 20px; }
.form-field { display: flex; min-width: 0; flex-direction: column; gap: 9px; }
.field-label { display: block; color: #46536a; font-size: 13px; font-weight: 500; line-height: 20px; }
.center .item { position: relative; display: flex; width: 100%; height: 50px; margin: 0; padding: 0 14px; align-items: center; border: 1px solid var(--login-border); border-radius: 7px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.center .item:hover { border-color: #b7c8df; }
.center .item:focus-within { border-color: var(--login-blue); box-shadow: 0 0 0 3px rgba(36, 120, 223, .1); }
.field-icon { display: grid; width: 20px; height: 20px; margin-right: 10px; flex: 0 0 20px; color: #8190a6; place-items: center; }
.field-icon svg { width: 18px; height: 18px; }
.field-content { display: flex; min-width: 0; flex: 1; }
.field-content input { width: 100%; min-width: 0; height: 28px; padding: 0; border: 0; outline: 0; color: #26364d; background: transparent; font: inherit; font-size: 14px; line-height: 28px; }
.field-content input::placeholder { color: #9aa6b7; opacity: 1; }
.field-content input::-ms-reveal, .field-content input::-ms-clear { display: none; }
.field-content input:-webkit-autofill { -webkit-text-fill-color: #26364d; box-shadow: 0 0 0 40px #fff inset; }
.bind-password { position: relative; display: grid; width: 30px; height: 32px; margin-left: 8px; padding: 0; flex: 0 0 30px; border: 0; border-radius: 4px; color: #8190a6; background: transparent; cursor: pointer; place-items: center; }
.bind-password:hover { color: var(--login-blue); background: #f0f5fc; }
.bind-password svg { display: block; width: 20px; height: 20px; }
.bind-password .password-eye-on, .bind-password.icon-5 .password-eye-off { display: none; }
.bind-password.icon-5 .password-eye-on { display: block; }
.captcha-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) 126px; gap: 12px; }
.captcha-refresh { display: grid; width: 100%; height: 50px; padding: 3px; overflow: hidden; border: 1px solid var(--login-border); border-radius: 7px; background: #f7f9fc; cursor: pointer; place-items: center; }
.captcha-refresh:hover { border-color: #b7c8df; background: #eef4fc; }
.validateImg { display: block; width: 100%; height: 42px; object-fit: contain; }
.login-panel button:focus-visible, .icon-nocheck:focus-visible { outline: 2px solid var(--login-blue); outline-offset: 3px; }

.tip { display: flex; min-height: 22px; margin-top: 20px; align-items: center; justify-content: space-between; gap: 12px; color: #768398; font-size: 12px; }
.remember-wrap, .help-wrap { position: relative; display: inline-flex; align-items: center; }
.icon-nocheck { display: inline-grid; width: 15px; height: 15px; margin-right: 7px; border: 1px solid #cbd3de; border-radius: 2px; background: #fff; cursor: pointer; place-items: center; }
.icon-nocheck.icon-check { border-color: var(--login-blue); background: var(--login-blue); }
.icon-nocheck.icon-check::after { width: 7px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; transform: rotate(-45deg) translate(1px, -1px); }
.login-tip { cursor: pointer; }
.forget-password { padding: 0; border: 0; color: var(--login-blue); background: transparent; font: inherit; cursor: pointer; }
.forget-password:hover { color: var(--login-blue-dark); }

.login-help-popover { position: absolute; right: -10px; bottom: 31px; display: none; width: 258px; padding: 14px; border: 1px solid #e2e8f1; border-radius: 7px; background: #fff; box-shadow: 0 14px 32px rgba(33, 50, 78, .16); }
.help-wrap.open .login-help-popover { display: flex; flex-direction: column; gap: 11px; }
.help-popover-arrow { position: absolute; right: 18px; bottom: -6px; width: 10px; height: 10px; border-right: 1px solid #e2e8f1; border-bottom: 1px solid #e2e8f1; background: #fff; transform: rotate(45deg); }
.help-popover-title { color: #25334b; font-size: 12px; font-weight: 700; }
.help-popover-title i { margin-right: 5px; color: var(--login-blue); }
.help-popover-item { display: flex; flex-direction: column; gap: 3px; }
.help-popover-item b { color: #35445b; font-size: 12px; font-weight: 600; }
.help-popover-item small { color: #8b98aa; font-size: 11px; }
.help-popover-close { align-self: flex-start; padding: 0; border: 0; color: var(--login-blue); background: transparent; font-size: 11px; cursor: pointer; }

.login-action { margin: 24px 0 0 !important; }
.login-btn { display: flex; width: 100%; min-height: 50px; padding: 0 18px; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 7px; color: #fff; background: var(--login-blue); box-shadow: 0 5px 12px rgba(36, 120, 223, .15); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.login-btn:hover { background: var(--login-blue-dark); box-shadow: 0 7px 16px rgba(36, 120, 223, .22); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.panel-foot { display: flex; margin: 24px auto 0; padding-top: 0; align-items: center; justify-content: center; gap: 6px; color: #8c98a9; font-size: 11px; line-height: 18px; }
.panel-foot i { color: #45bd91; }

.footer { width: fit-content; max-width: calc(100% - 48px); margin: 0 auto 12px; padding: 8px 18px 9px; border: 1px solid rgba(174, 222, 255, .18); border-radius: 999px; color: rgba(236, 248, 255, .9); background: rgba(2, 18, 53, .72); font-size: 11px; line-height: 1.5; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: #fff; }
.padding-5 { padding: 0 7px; }

.layui-layer.login-status-toast { min-width: 280px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; background: rgba(16, 32, 58, .95); box-shadow: 0 14px 32px rgba(10, 22, 44, .22); }
.layui-layer.login-status-toast .layui-layer-content { display: flex; min-height: 62px; padding: 14px 18px 14px 58px !important; align-items: center; }
.layui-layer.login-status-toast .layui-layer-face { top: 50% !important; left: 20px !important; display: grid; width: 27px; height: 27px; margin-top: -14px; border: 1px solid currentColor; border-radius: 50%; font-size: 16px !important; line-height: 27px !important; background: rgba(255,255,255,.05); place-items: center; }
.layui-layer.login-status-success .layui-layer-face { color: #55d3a5 !important; }
.layui-layer.login-status-error .layui-layer-face { color: #ff8395 !important; }
.login-toast-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.login-toast-copy strong { overflow: hidden; color: #fff; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.login-toast-copy span { color: #aebbd0; font-size: 11px; }

@media (max-width: 1100px) {
    .login-stage { padding: 32px 24px 24px; }
    .visual-content { padding-right: 32px; padding-left: 32px; }
    .visual-copy h1 { font-size: clamp(26px, 3.45vw, 37px); }
    .visual-assurance { gap: 16px; }
    .login-panel { padding: 42px 32px 32px; }
}

@media (max-width: 760px) {
    html, body { height: auto; }
    body { overflow-x: hidden; overflow-y: auto; background-attachment: scroll; }
    .login-shell { min-height: 100svh; }
    .login-stage { padding: 22px 14px 20px; }
    .login-card { display: block; width: min(460px, 100%); min-height: 0; border-radius: 12px; }
    .login-visual { min-height: 0; }
    .visual-content { min-height: 0; padding: 24px 25px; }
    .brand-mark, .brand-mark img { width: 38px; height: 38px; }
    .brand-mark { flex-basis: 38px; }
    .brand-copy strong { font-size: 16px; }
    .visual-copy { margin-top: 20px; padding: 0; }
    .visual-utility { display: none; }
    .visual-copy h1 { margin: 0 0 8px; font-size: clamp(23px, 6.1vw, 29px); }
    .visual-copy p { font-size: 12px; }
    .visual-assurance { display: none; }
    .login-panel { padding: 28px 25px 25px; }
    .panel-heading { margin-bottom: 24px; }
    .panel-heading h1 { font-size: 25px; }
    .panel-heading p { font-size: 13px; }
    .field-content input { font-size: 16px; }
    .login-bottom .center { gap: 18px; }
    .captcha-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; }
    .panel-foot { margin-top: 22px; }
    .footer { max-width: calc(100% - 28px); padding: 9px 14px; border-radius: 12px; }
}

@media (max-width: 360px) {
    .login-panel { padding-right: 20px; padding-left: 20px; }
    .visual-content { padding-right: 20px; padding-left: 20px; }
    .captcha-row { grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
    .captcha-item .field-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .center .item, .login-btn { transition: none; }
}
