:root {
    --login-bg: #070b17;
    --login-panel: rgba(13, 20, 39, .86);
    --login-line: rgba(148, 163, 184, .18);
    --login-text: #f8fafc;
    --login-muted: #8e9bb0;
    --login-primary: #6c63ff;
    --login-cyan: #22d3ee;
}

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

html.ea-main-frame body {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    zoom: 1 !important;
}

body {
    overflow: hidden;
    background: var(--login-bg) center / cover no-repeat fixed;
    color: var(--login-text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 23, .90) 0%, rgba(7, 11, 23, .80) 40%, rgba(7, 11, 23, .52) 100%),
        linear-gradient(180deg, rgba(7, 11, 23, .12), rgba(7, 11, 23, .72));
    pointer-events: none;
}

* { box-sizing: border-box; }

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100%;
    overflow: hidden;
    isolation: isolate;
}

.login-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .3;
    background-image:
        linear-gradient(rgba(108, 99, 255, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 99, 255, .12) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to right, #000, transparent 78%);
}

.login-grid::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 56%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .75), transparent);
    box-shadow: 0 0 20px rgba(34, 211, 238, .45);
}

.login-ambient {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(12px);
    pointer-events: none;
}

.login-ambient-one {
    width: 480px;
    height: 480px;
    left: -180px;
    top: -180px;
    background: radial-gradient(circle, rgba(108, 99, 255, .26), transparent 68%);
}

.login-ambient-two {
    width: 520px;
    height: 520px;
    right: -160px;
    bottom: -230px;
    background: radial-gradient(circle, rgba(34, 211, 238, .16), transparent 68%);
}

.login-brand {
    position: absolute;
    top: 42px;
    left: clamp(28px, 5vw, 80px);
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 50px;
    color: var(--login-cyan);
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, .24));
}

.brand-mark svg { width: 100%; height: 100%; }
.brand-mark img {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: contain;
    filter: drop-shadow(0 7px 16px rgba(34, 211, 238, .22));
}
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font-size: 17px; letter-spacing: .06em; }
.brand-copy span { color: var(--login-muted); font-size: 11px; letter-spacing: .22em; }

.login-stage {
    display: grid;
    grid-template-columns: minmax(390px, 1fr) 440px;
    align-items: center;
    gap: clamp(70px, 9vw, 150px);
    width: min(1240px, calc(100% - 100px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 104px 0 86px;
}

.login-story { max-width: 640px; padding-left: 10px; }

.story-kicker,
.panel-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--login-cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
}

.story-kicker span,
.panel-badge span {
    width: 24px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.login-story h1 {
    margin: 22px 0 20px;
    color: #f8fafc;
    font-size: clamp(44px, 5vw, 72px);
    font-weight: 750;
    line-height: 1.13;
    letter-spacing: -.04em;
}

.login-story h1 em {
    color: transparent;
    font-style: normal;
    background: linear-gradient(100deg, #8b85ff 5%, #22d3ee 90%);
    -webkit-background-clip: text;
    background-clip: text;
}

.login-story > p {
    max-width: 540px;
    margin: 0;
    color: #9aa7ba;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: .02em;
}

.story-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 50px;
}

.story-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px 14px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 14px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(10px);
}

.feature-picture {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(34, 211, 238, .07);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .08);
}

.feature-picture img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.story-feature div { min-width: 0; }
.story-feature strong, .story-feature span { display: block; white-space: nowrap; }
.story-feature strong { margin-bottom: 4px; font-size: 13px; }
.story-feature span { overflow: hidden; color: #75849a; font-size: 10px; text-overflow: ellipsis; }

.login-panel {
    position: relative;
    width: 440px;
    padding: 38px 42px 30px;
    border: 1px solid var(--login-line);
    border-radius: 24px;
    background: var(--login-panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(24px);
}

.login-panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 48px;
    width: 112px;
    height: 2px;
    background: linear-gradient(90deg, var(--login-primary), var(--login-cyan));
    box-shadow: 0 0 16px rgba(34, 211, 238, .5);
}

.panel-heading { margin: 27px 0 30px; }
.panel-heading h2 { margin: 0 0 7px; color: #fff; font-size: 28px; line-height: 1.2; }
.panel-heading p { margin: 0; color: var(--login-muted); font-size: 13px; }

.login-bottom, .center { width: 100%; }
.demo { padding: 10px 0; text-align: center; color: #a5b4fc !important; font-size: 13px; }

.center .item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 66px;
    margin-bottom: 14px;
    padding: 0 16px;
    border: 1px solid var(--login-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
    cursor: text;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.center .item:focus-within {
    border-color: rgba(108, 99, 255, .8);
    background: rgba(108, 99, 255, .06);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, .1);
}

.field-icon {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-right: 13px;
    color: #728198;
}

.field-icon svg { width: 21px; height: 21px; }
.field-content { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.field-label { color: #718198; font-size: 10px; letter-spacing: .08em; }

.center .item input {
    display: block;
    width: 100%;
    height: 22px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #edf2ff;
    background: transparent;
    font-size: 14px;
}

.center .item input::placeholder { color: #59677b; }
.center .item input:-webkit-autofill {
    -webkit-text-fill-color: #edf2ff !important;
    box-shadow: 0 0 0 1000px #111a2e inset !important;
}

.bind-password {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    cursor: pointer;
}

.bind-password::before {
    content: "\f070";
    position: absolute;
    inset: 0;
    color: #718198;
    font: normal normal normal 14px/22px FontAwesome;
    text-align: center;
}

.bind-password.icon-5::before { content: "\f06e"; color: #a5b4fc; }

.captcha-item .validateImg {
    flex: 0 0 96px;
    width: 96px;
    height: 38px;
    margin-left: 10px;
    border: 0;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
}

.tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 24px;
    margin-top: 2px;
}

.remember-wrap { display: inline-flex; align-items: center; }
.icon-nocheck {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin-right: 8px;
    border: 1px solid #526079;
    border-radius: 5px;
    cursor: pointer;
    transition: all .2s;
}

.icon-nocheck.icon-check { border-color: var(--login-primary); background: var(--login-primary); }
.icon-nocheck.icon-check::after { content: "✓"; color: #fff; font-size: 11px; line-height: 1; }
.login-tip, .forget-password { color: #7f8da2; font-size: 12px; cursor: pointer; }
.help-wrap { position: relative; display: inline-flex; }
.forget-password {
    margin: 0;
    padding: 4px 0;
    border: 0;
    outline: 0;
    color: #a6a3ff;
    background: transparent;
    font-family: inherit;
    text-decoration: none;
}
.forget-password:hover { color: #c2c0ff; }

.login-help-popover {
    position: absolute;
    right: -8px;
    bottom: 31px;
    z-index: 20;
    display: block;
    width: 265px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 13px;
    opacity: 0;
    visibility: hidden;
    color: #e8edfa;
    background: #151d31;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
    text-align: left;
    transform: translateY(7px) scale(.98);
    transform-origin: right bottom;
    transition: opacity .18s, visibility .18s, transform .18s;
}

.help-wrap.open .login-help-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.help-popover-arrow {
    position: absolute;
    right: 22px;
    bottom: -6px;
    width: 11px;
    height: 11px;
    border-right: 1px solid rgba(148, 163, 184, .2);
    border-bottom: 1px solid rgba(148, 163, 184, .2);
    background: #151d31;
    transform: rotate(45deg);
}

.help-popover-title,
.help-popover-item,
.help-popover-item b,
.help-popover-item small {
    display: block;
}

.help-popover-title {
    margin-bottom: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.help-popover-title i { margin-right: 6px; color: var(--login-cyan); }
.help-popover-item {
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, .11);
}
.help-popover-item b { margin-bottom: 4px; color: #ced6e7; font-size: 11px; font-weight: 600; }
.help-popover-item small { color: #75849b; font-size: 10px; line-height: 1.6; }
.help-popover-close {
    width: 100%;
    height: 30px;
    margin-top: 3px;
    border: 1px solid rgba(108, 99, 255, .3);
    border-radius: 7px;
    color: #b9b6ff;
    background: rgba(108, 99, 255, .1);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}
.help-popover-close:hover { color: #fff; background: rgba(108, 99, 255, .2); }

.login-action { width: 100%; height: auto !important; margin: 24px 0 0 !important; }
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(100deg, #655cff, #7a72ff 58%, #4f9cff);
    box-shadow: 0 12px 28px rgba(108, 99, 255, .28);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.login-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 16px 34px rgba(108, 99, 255, .36);
}
.login-btn i { transition: transform .2s; }
.login-btn:hover i { transform: translateX(4px); }
.login-btn.is-loading {
	cursor: wait;
	filter: saturate(.82);
	transform: none;
	box-shadow: 0 8px 20px rgba(108, 99, 255, .2);
}
.login-btn.is-loading i { transform: none; }

/* 登录提交使用按钮内状态，隐藏 EasyAdmin 自动生成的居中白色 loading。 */
body.login-submitting .layui-layer-msg:has(.layui-icon-loading) {
	display: none !important;
}

.panel-foot {
    margin-top: 24px;
    color: #59677a;
    font-size: 11px;
    text-align: center;
}
.panel-foot i { margin-right: 5px; color: #4bbaae; }

/* 登录结果提示：覆盖 Layui 默认白色消息框，适配深色登录页。 */
.layui-layer.login-status-toast {
    width: min(360px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(110, 129, 166, .32) !important;
    border-radius: 16px !important;
    color: #eef4ff !important;
    background: rgba(11, 19, 35, .96) !important;
    box-shadow: 0 20px 56px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 255, 255, .025) inset !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.layui-layer.login-status-toast::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    right: 16px;
    left: 16px;
    height: 2px;
    border-radius: 0 0 2px 2px;
}

.layui-layer.login-status-success::before {
    background: linear-gradient(90deg, transparent, #23e6c5 24%, #45a3ff 76%, transparent);
    box-shadow: 0 0 14px rgba(35, 230, 197, .52);
}

.layui-layer.login-status-error::before {
    background: linear-gradient(90deg, transparent, #fb7185 24%, #f59e0b 76%, transparent);
    box-shadow: 0 0 14px rgba(251, 113, 133, .48);
}

.layui-layer.login-status-toast .layui-layer-content {
    display: flex;
    align-items: center;
    min-height: 82px;
    box-sizing: border-box;
    padding: 17px 22px 17px 72px !important;
    color: #eef4ff !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.layui-layer.login-status-toast .layui-layer-face {
    top: 50% !important;
    left: 22px !important;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 22px !important;
    line-height: 34px !important;
    background: rgba(255, 255, 255, .035);
    box-shadow: 0 0 20px currentColor;
}

.layui-layer.login-status-success .layui-layer-face { color: #2dd4a7 !important; }
.layui-layer.login-status-error .layui-layer-face { color: #fb7185 !important; }

.login-toast-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    animation: login-toast-copy-in .28s ease-out both;
}

.login-toast-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-toast-copy span {
    color: #8392aa;
    font-size: 11px;
    letter-spacing: .02em;
}

@keyframes login-toast-copy-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    color: #59677a;
    font-size: 11px;
    line-height: 24px;
    text-align: center;
}
.footer a, .footer span { color: #69778b; text-decoration: none; }
.padding-5 { padding: 5px !important; }

@media (max-width: 1050px) {
    .login-stage { grid-template-columns: minmax(280px, 1fr) 410px; gap: 45px; width: calc(100% - 60px); }
    .login-panel { width: 410px; }
    .story-features { grid-template-columns: 1fr; max-width: 260px; margin-top: 34px; }
}

@media (max-width: 820px) {
    body { overflow: auto; }
    body::before { background: rgba(7, 11, 23, .72); }
    .login-brand { position: relative; top: auto; left: auto; width: min(430px, calc(100% - 36px)); margin: 28px auto 0; }
    .login-stage { display: block; width: min(430px, calc(100% - 36px)); min-height: auto; padding: 45px 0 90px; }
    .login-story { margin-bottom: 28px; padding: 0; }
    .story-kicker, .login-story > p, .story-features { display: none; }
    .login-story h1 { margin: 0; font-size: 34px; line-height: 1.25; }
    .login-story h1 br { display: none; }
    .login-panel { width: 100%; padding: 32px 28px 26px; }
    .footer { position: relative; bottom: auto; padding: 0 18px 20px; }
}

@media (max-width: 430px) {
    .login-brand { margin-top: 22px; }
    .login-stage { padding-top: 36px; }
    .login-story h1 { font-size: 29px; }
    .login-panel { padding: 29px 20px 24px; border-radius: 20px; }
    .panel-heading { margin: 23px 0 25px; }
    .panel-heading h2 { font-size: 25px; }
    .login-help-popover { right: -4px; width: min(265px, calc(100vw - 76px)); }
}
