:root {
    --auth-bg: #07111f;
    --auth-panel: #ffffff;
    --auth-blue: #3977f6;
    --auth-cyan: #45d7e8;
    --auth-text: #182134;
    --auth-muted: #788399;
    --auth-line: #e2e7ef;
    --auth-danger: #e5484d;
}

html {
    min-height: 100%;
    background: var(--auth-bg);
}

body.signin {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #fff;
    background: var(--auth-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 0 clamp(28px, 5vw, 76px);
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 12%, rgba(57, 119, 246, .16), transparent 25%),
        radial-gradient(circle at 92% 74%, rgba(69, 215, 232, .08), transparent 27%),
        linear-gradient(132deg, #06101e 0%, #0a1728 54%, #091421 100%);
    flex-direction: column;
    isolation: isolate;
}

.page-grid {
    position: absolute;
    z-index: -3;
    inset: 0;
    opacity: .07;
    background-image:
        linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .3) 1px, transparent 1px);
    background-size: 68px 68px;
    -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 75%);
    mask-image: radial-gradient(circle at center, #000 0%, transparent 75%);
}

.aurora {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.aurora::before,
.aurora::after {
    position: absolute;
    content: "";
    border-radius: inherit;
}

.aurora-one {
    top: -250px;
    left: 16%;
    width: 720px;
    height: 520px;
    background: radial-gradient(ellipse, rgba(35, 102, 237, .18), transparent 67%);
    transform: rotate(-12deg);
}

.aurora-one::before {
    top: 190px;
    left: 210px;
    width: 320px;
    height: 120px;
    background: rgba(69, 215, 232, .12);
    filter: blur(70px);
}

.aurora-two {
    right: -260px;
    bottom: -270px;
    width: 720px;
    height: 720px;
    border: 1px solid rgba(69, 215, 232, .08);
    box-shadow:
        0 0 0 80px rgba(255, 255, 255, .012),
        0 0 0 160px rgba(57, 119, 246, .012);
}

.aurora-two::before {
    inset: 115px;
    border: 1px solid rgba(69, 215, 232, .07);
}

.aurora-two::after {
    inset: 225px;
    border: 1px solid rgba(69, 215, 232, .06);
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1320px;
    min-height: 104px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.brand-symbol {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
    flex: 0 0 auto;
    backdrop-filter: blur(12px);
}

.brand-symbol i {
    position: absolute;
    display: block;
    background: #fff;
    transform: rotate(45deg);
}

.brand-symbol i:first-child {
    top: 8px;
    left: 8px;
    width: 13px;
    height: 13px;
    border-radius: 4px;
}

.brand-symbol i:nth-child(2) {
    right: 8px;
    bottom: 8px;
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: var(--auth-cyan);
}

.brand-symbol i:nth-child(3) {
    top: 18px;
    left: 18px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--auth-blue);
    box-shadow: 0 0 13px rgba(57, 119, 246, .8);
}

.brand-text {
    max-width: 480px;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-state {
    display: inline-flex;
    height: 34px;
    padding: 0 13px;
    color: rgba(221, 233, 248, .62);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 100px;
    background: rgba(255, 255, 255, .035);
    font-size: 11px;
    align-items: center;
    gap: 8px;
}

.system-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, .75);
}

.login-stage {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    max-width: 1160px;
    margin: auto;
    padding: 28px 0 58px;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: clamp(60px, 8vw, 128px);
}

.portal-copy {
    max-width: 610px;
    padding: 16px 0;
    animation: portal-in .65s ease-out both;
}

.portal-tag {
    display: inline-flex;
    height: 34px;
    padding: 0 13px;
    color: rgba(216, 231, 249, .65);
    border: 1px solid rgba(69, 215, 232, .15);
    border-radius: 100px;
    background: rgba(69, 215, 232, .05);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    align-items: center;
    gap: 8px;
}

.portal-tag .fa {
    color: var(--auth-cyan);
    font-size: 12px;
}

.portal-copy h1 {
    margin: 27px 0 22px;
    color: #f7fbff;
    font-size: clamp(42px, 4.2vw, 66px);
    font-weight: 680;
    line-height: 1.16;
    letter-spacing: -.045em;
}

.portal-copy h1 em {
    color: transparent;
    background: linear-gradient(90deg, #80b2ff 0%, #6ce1e8 72%);
    font-style: normal;
    background-clip: text;
    -webkit-background-clip: text;
}

.portal-copy > p {
    max-width: 540px;
    margin: 0;
    color: rgba(211, 225, 243, .58);
    font-size: 15px;
    line-height: 1.9;
}

.capability-list {
    display: grid;
    margin-top: 46px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.capability-item {
    display: flex;
    min-width: 0;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
    align-items: center;
    gap: 10px;
}

.capability-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    color: #8db9ff;
    border-radius: 10px;
    background: rgba(57, 119, 246, .1);
    align-items: center;
    flex: 0 0 auto;
    justify-content: center;
}

.capability-item strong,
.capability-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capability-item strong {
    color: rgba(244, 248, 255, .88);
    font-size: 12px;
    font-weight: 600;
}

.capability-item small {
    margin-top: 3px;
    color: rgba(205, 220, 238, .4);
    font-size: 9px;
}

.auth-card {
    position: relative;
    width: 100%;
    padding: 38px 38px 30px;
    color: var(--auth-text);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 26px;
    background: rgba(255, 255, 255, .97);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, .28),
        0 2px 0 rgba(255, 255, 255, .5) inset;
    animation: card-in .65s .08s ease-out both;
    backdrop-filter: blur(24px);
}

.auth-card::before {
    position: absolute;
    top: 0;
    right: 34px;
    left: 34px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(57, 119, 246, .42), transparent);
}

.auth-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    color: var(--auth-blue);
    border-radius: 13px;
    background: #edf3ff;
    font-size: 17px;
    align-items: center;
    justify-content: center;
}

.auth-label {
    color: #a0a8b8;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .15em;
}

.auth-heading {
    margin: 25px 0 27px;
}

.auth-heading h2 {
    margin: 0 0 8px;
    color: var(--auth-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-heading strong {
    color: #42516b;
    font-weight: 600;
}

.login-form {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.form-field {
    position: relative;
    margin-bottom: 18px;
}

.form-field > label,
.field-label-row label {
    display: block;
    margin: 0 0 8px;
    color: #3d475a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row span {
    margin-bottom: 8px;
    color: #a0a9b8;
    font-size: 10px;
}

.field-label-row span .fa {
    margin-right: 3px;
    color: var(--auth-blue);
}

.field-control {
    position: relative;
}

.field-control .form-control {
    width: 100%;
    height: 48px !important;
    margin: 0;
    padding: 0 44px !important;
    color: var(--auth-text);
    border: 1px solid var(--auth-line);
    border-radius: 11px !important;
    outline: none;
    background: #f9fafc;
    font-size: 13px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field-control .form-control::placeholder {
    color: #aab2c0;
}

.field-control .form-control:hover {
    border-color: #ccd4e1;
    background: #fff;
}

.field-control .form-control:focus {
    color: var(--auth-text);
    border-color: var(--auth-blue) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(57, 119, 246, .09) !important;
}

.field-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    width: 15px;
    color: #919caf;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color .2s ease;
}

.field-control:focus-within .field-icon {
    color: var(--auth-blue);
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 8px;
    display: inline-flex;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #909bad;
    border: 0;
    border-radius: 8px;
    outline: none;
    background: transparent;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--auth-blue);
    background: #edf3ff;
}

.login-button {
    display: flex;
    width: 100%;
    height: 50px;
    margin-top: 7px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 11px;
    outline: none;
    background: linear-gradient(100deg, #3375f6 0%, #2466e9 100%);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 23px rgba(37, 103, 235, .23);
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-button:hover,
.login-button:focus {
    color: #fff;
    filter: brightness(1.04);
    box-shadow: 0 15px 29px rgba(37, 103, 235, .3);
    transform: translateY(-1px);
}

.login-button:active {
    box-shadow: 0 7px 15px rgba(37, 103, 235, .2);
    transform: translateY(1px);
}

.login-button .fa {
    font-size: 12px;
    transition: transform .2s ease;
}

.login-button:hover .fa {
    transform: translateX(3px);
}

.security-note {
    display: flex;
    margin-top: 22px;
    padding-top: 19px;
    color: #919aab;
    border-top: 1px solid #edf0f5;
    font-size: 10px;
    line-height: 1.55;
    align-items: flex-start;
    gap: 8px;
}

.security-note .fa {
    margin-top: 2px;
    color: #6f88af;
}

.page-footer {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 72px;
    color: rgba(203, 219, 238, .35);
    font-size: 10px;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-divider {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, .12);
}

label.error {
    position: static;
    display: block;
    margin: 6px 2px 0;
    color: var(--auth-danger);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.form-field.has-field-error .form-control {
    border-color: var(--auth-danger) !important;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .08) !important;
}

.form-field.has-field-error .field-icon {
    color: var(--auth-danger);
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 120px !important;
}

body .layer-ext-moon-msg {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background-color: rgba(8, 20, 35, .94);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
    backdrop-filter: blur(12px);
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 13px 24px;
    text-align: center;
}

@keyframes portal-in {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 1080px) {
    .login-stage {
        max-width: 930px;
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 54px;
    }

    .portal-copy h1 {
        font-size: 46px;
    }

    .capability-list {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .capability-item:nth-child(3) {
        display: none;
    }
}

@media screen and (max-width: 820px) {
    .login-page {
        padding: 0 24px;
        overflow-y: auto;
    }

    .topbar {
        min-height: 84px;
    }

    .login-stage {
        display: block;
        width: 100%;
        max-width: 440px;
        padding: 28px 0 46px;
    }

    .portal-copy {
        padding: 0;
        text-align: center;
    }

    .portal-copy h1 {
        margin: 17px 0 28px;
        font-size: 36px;
        line-height: 1.2;
    }

    .portal-copy > p,
    .capability-list {
        display: none;
    }

    .portal-tag {
        height: 30px;
        font-size: 9px;
    }

    .auth-card {
        padding: 34px 34px 28px;
        border-radius: 24px;
    }
}

@media screen and (max-width: 520px) {
    .login-page {
        padding: 0 16px;
    }

    .topbar {
        min-height: 72px;
    }

    .brand-symbol {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .brand-text {
        max-width: 205px;
        font-size: 16px;
    }

    .system-state {
        display: none;
    }

    .login-stage {
        padding: 18px 0 34px;
    }

    .portal-tag {
        display: none;
    }

    .portal-copy h1 {
        margin: 0 0 24px;
        font-size: 29px;
    }

    .auth-card {
        padding: 28px 22px 24px;
        border-radius: 20px;
    }

    .auth-card-head {
        margin-bottom: 21px;
    }

    .auth-heading {
        margin: 0 0 25px;
    }

    .auth-heading h2 {
        font-size: 25px;
    }

    .field-label-row span {
        display: none;
    }

    .field-control .form-control {
        height: 47px !important;
    }

    .login-button {
        height: 48px;
    }

    .page-footer {
        min-height: 60px;
    }
}

@media screen and (max-height: 760px) and (min-width: 821px) {
    .topbar {
        min-height: 78px;
    }

    .login-stage {
        padding-top: 14px;
        padding-bottom: 24px;
    }

    .portal-copy h1 {
        margin-top: 18px;
        margin-bottom: 15px;
        font-size: 45px;
    }

    .capability-list {
        margin-top: 28px;
    }

    .auth-card {
        padding-top: 30px;
        padding-bottom: 24px;
    }

    .auth-heading {
        margin-top: 18px;
        margin-bottom: 20px;
    }

    .form-field {
        margin-bottom: 14px;
    }

    .page-footer {
        min-height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-copy,
    .auth-card {
        animation: none;
    }

    .field-control .form-control,
    .login-button,
    .login-button .fa {
        transition: none;
    }
}
