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

body.login-page {
    position: relative;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: #f6f2ff;
    background:
        radial-gradient(900px 700px at 14% 8%, rgba(124, 92, 255, 0.18), transparent 62%),
        radial-gradient(820px 620px at 92% 16%, rgba(196, 74, 255, 0.1), transparent 62%),
        radial-gradient(720px 520px at 52% 114%, rgba(240, 185, 107, 0.08), transparent 62%),
        #07060c;
    color-scheme: dark;
    font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.login-page *,
.login-page *::before,
.login-page *::after {
    box-sizing: border-box;
}

.login-page a {
    color: inherit;
    text-decoration: none;
}

.login-page button,
.login-page input {
    font: inherit;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

.login-page::after {
    content: "";
    position: fixed;
    top: -190px;
    right: -150px;
    z-index: 0;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.26), transparent 66%);
    filter: blur(12px);
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(360px, 432px);
    align-items: center;
    gap: 72px;
    width: min(1180px, calc(100% - 96px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 64px 0;
}

.login-brand {
    max-width: 620px;
    animation: loginBrandIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #160f28;
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(216, 200, 255, 0.98), rgba(111, 75, 255, 0.92));
    box-shadow:
        0 12px 30px rgba(111, 75, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand-name {
    color: #f3efff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.brand-name span {
    color: #8d84a1;
    font-weight: 600;
}

.brand-badge {
    margin-left: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #9b90ad;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.brand-copy {
    margin-top: clamp(64px, 14vh, 150px);
}

.brand-eyebrow {
    margin: 0 0 18px;
    color: #b7a3ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.24em;
}

.brand-copy h1 {
    max-width: 680px;
    margin: 0;
    color: #f7f3ff;
    font-size: clamp(36px, 3.8vw, 54px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.brand-copy h1 em {
    display: inline;
    color: transparent;
    font-style: normal;
    background: linear-gradient(112deg, #e1d5ff 0%, #b49bff 46%, #f1bd74 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-lede {
    max-width: 460px;
    margin: 26px 0 0;
    color: #a8a0b7;
    font-size: 14px;
    line-height: 1.85;
}

.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 34px;
}

.brand-features span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #c9c2d7;
    font-size: 11px;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.025);
}

.brand-features i {
    color: #a78bfa;
    font-size: 5px;
}

.brand-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: clamp(54px, 10vh, 110px);
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #6f687f;
    font-size: 10px;
    letter-spacing: 0.14em;
}

.login-card-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 432px;
    padding: 36px 34px 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(31, 26, 45, 0.94), rgba(13, 11, 20, 0.94));
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: loginCardIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s both;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.9), transparent);
}

.login-card::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(124, 92, 255, 0.16);
    filter: blur(40px);
}

.login-card-head {
    position: relative;
    z-index: 1;
    margin-bottom: 28px;
}

.card-kicker {
    display: block;
    margin-bottom: 14px;
    color: #b7a3ff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.24em;
}

.login-card-head h2 {
    margin: 0;
    color: #f8f4ff;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.login-card-head p {
    margin: 10px 0 0;
    color: #8f879f;
    font-size: 12px;
}

.login-card form {
    position: relative;
    z-index: 1;
}

.field {
    margin-top: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #bdb5ca;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-shell > i {
    flex: 0 0 16px;
    width: 16px;
    color: #766e87;
    font-size: 14px;
    text-align: center;
}

.input-shell input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: #f6f2ff;
    font-size: 13px;
    letter-spacing: 0.01em;
    background: transparent;
}

.input-shell input::placeholder {
    color: #6e667c;
}

.input-shell:focus-within {
    border-color: rgba(167, 139, 250, 0.64);
    background: rgba(124, 92, 255, 0.055);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}

.input-shell:focus-within > i {
    color: #b7a3ff;
}

.field-captcha .captcha-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 10px;
}

.captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 52px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: #f7f6f9;
}

.captcha-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 18px;
    margin-top: 16px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #a9a1b7;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #a78bfa;
    cursor: pointer;
}

.login-meta-note {
    color: #696276;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin-top: 22px;
    border: 0;
    border-radius: 12px;
    color: #160f28;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: linear-gradient(135deg, #d8c8ff 0%, #a78bfa 42%, #7c5cff 100%);
    box-shadow:
        0 14px 34px rgba(111, 75, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit i {
    font-size: 13px;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        0 18px 42px rgba(111, 75, 255, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.login-alt {
    margin-top: 18px;
    color: #837b92;
    font-size: 11px;
    text-align: center;
}

.login-alt a {
    margin-left: 4px;
    color: #c8b6ff;
    font-weight: 600;
    border-bottom: 1px solid rgba(200, 182, 255, 0.3);
}

.login-alt a:hover {
    color: #f0e9ff;
    border-bottom-color: rgba(240, 233, 255, 0.6);
}

.login-card-foot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #625c70;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.login-page label.error {
    position: static !important;
    display: block;
    margin-top: 6px;
    color: #ff8d9b;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.45;
}

.login-page label.error i {
    margin-right: 4px;
}

.login-page input.error {
    border-color: rgba(255, 141, 155, 0.64) !important;
}

.login-page .layer-ext-moon-msg {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f6f2ff;
    background: rgba(10, 8, 16, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.login-page .layer-ext-moon-msg .layui-layer-content {
    padding: 12px 22px;
    font-size: 12px;
    text-align: center;
}

.login-page input:-webkit-autofill,
.login-page input:-webkit-autofill:hover,
.login-page input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f6f2ff;
    box-shadow: 0 0 0 1000px #17131f inset;
    transition: background-color 9999s ease-out 0s;
}

@keyframes loginBrandIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1020px) {
    .login-page::after {
        top: -130px;
        right: -120px;
        width: 340px;
        height: 340px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 0;
        width: min(480px, calc(100% - 40px));
        min-height: 100vh;
        padding: 34px 0;
    }

    .login-brand {
        display: none;
    }

    .login-card-wrap {
        justify-content: center;
    }

    .login-card {
        max-width: 480px;
    }
}

@media (max-width: 520px) {
    .login-shell {
        width: 100%;
        padding: 20px 16px;
    }

    .login-card {
        padding: 28px 20px 20px;
        border-radius: 20px;
    }

    .login-card-head h2 {
        font-size: 26px;
    }

    .field-captcha .captcha-shell {
        grid-template-columns: minmax(0, 1fr) 96px;
    }

    .login-meta-note {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-brand,
    .login-card {
        animation: none;
    }

    .login-submit {
        transition: none;
    }
}
