:root {
    --login-ink: #14213d;
    --login-muted: #6e7892;
    --login-line: #dce3ee;
    --login-panel: #f5f7fb;
    --login-blue: #2968f0;
    --login-blue-dark: #1f52c8;
    --login-navy: #07152c;
    --login-cyan: #2bd4c8;
    --login-danger: #df405a;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.signin {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--login-ink);
    background: var(--login-navy);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(420px, 1.12fr) minmax(480px, 0.88fr);
    min-height: 100vh;
    isolation: isolate;
}

.ambient {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.ambient-one {
    top: -28vw;
    left: -20vw;
    width: 62vw;
    height: 62vw;
    opacity: .26;
    background: radial-gradient(circle, rgba(43, 212, 200, .65) 0%, rgba(43, 212, 200, 0) 66%);
}

.ambient-two {
    right: 31%;
    bottom: -40vw;
    width: 70vw;
    height: 70vw;
    opacity: .2;
    background: radial-gradient(circle, rgba(67, 107, 255, .9) 0%, rgba(67, 107, 255, 0) 68%);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(42px, 5vw, 76px) clamp(44px, 7vw, 112px);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(9, 30, 61, .9), rgba(5, 19, 42, .98)),
        var(--login-navy);
}

.brand-panel::before {
    content: "";
    position: absolute;
    top: 18%;
    right: -24%;
    width: 58%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow:
        0 0 0 48px rgba(255, 255, 255, .018),
        0 0 0 96px rgba(255, 255, 255, .014),
        0 0 0 144px rgba(255, 255, 255, .01);
}

.brand-panel::after {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 18%;
    width: 180px;
    height: 180px;
    opacity: .28;
    background-image: radial-gradient(rgba(255, 255, 255, .38) 1px, transparent 1px);
    background-size: 16px 16px;
    -webkit-mask-image: linear-gradient(135deg, #000, transparent 78%);
    mask-image: linear-gradient(135deg, #000, transparent 78%);
}

.brand-header,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 7px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--login-cyan), #4c7bf4);
    box-shadow: 0 12px 30px rgba(43, 212, 200, .18);
    transform: rotate(45deg);
}

.brand-mark span {
    display: block;
    border-radius: 2px;
    background: rgba(255, 255, 255, .94);
}

.brand-mark span:nth-child(1),
.brand-mark span:nth-child(4) {
    opacity: .54;
}

.brand-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name strong {
    max-width: 340px;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-name small {
    margin-top: 3px;
    color: rgba(211, 226, 248, .5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2em;
}

.brand-copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: clamp(72px, 10vh, 130px) 0 auto;
}

.brand-eyebrow,
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--login-cyan);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .2em;
}

.brand-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    margin-right: 10px;
    background: currentColor;
}

.brand-copy h1 {
    margin: 24px 0 22px;
    color: #fff;
    font-size: clamp(39px, 4.3vw, 66px);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.045em;
}

.brand-copy h1 em {
    color: #9debe5;
    font-style: normal;
}

.brand-copy p {
    max-width: 560px;
    margin: 0;
    color: rgba(216, 227, 244, .66);
    font-size: 15px;
    line-height: 1.9;
}

.brand-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 650px;
    margin: 42px 0 44px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
    backdrop-filter: blur(10px);
}

.feature-icon {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--login-cyan);
    background: rgba(43, 212, 200, .1);
}

.feature-item div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.feature-item strong {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    font-weight: 600;
}

.feature-item small {
    overflow: hidden;
    color: rgba(211, 226, 248, .45);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    color: rgba(211, 226, 248, .46);
    font-size: 11px;
    letter-spacing: .03em;
}

.status-dot {
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border: 2px solid rgba(43, 212, 200, .28);
    border-radius: 50%;
    background: var(--login-cyan);
    box-shadow: 0 0 12px rgba(43, 212, 200, .65);
}

.footer-separator {
    width: 1px;
    height: 12px;
    margin: 0 14px;
    background: rgba(255, 255, 255, .12);
}

.access-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 44px clamp(34px, 5vw, 84px);
    background:
        radial-gradient(circle at 84% 10%, rgba(41, 104, 240, .08), transparent 28%),
        var(--login-panel);
}

.auth-wrap {
    width: min(100%, 440px);
}

.mobile-brand {
    display: none;
}

.auth-card {
    width: 100%;
}

.auth-header {
    margin-bottom: 42px;
}

.auth-eyebrow {
    color: var(--login-blue);
}

.auth-header h2 {
    margin: 13px 0 11px;
    color: var(--login-ink);
    font-size: clamp(30px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.035em;
}

.auth-header p {
    margin: 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.7;
}

.auth-header p strong {
    color: #3a4763;
    font-weight: 600;
}

.field-group {
    position: relative;
    margin-bottom: 23px;
}

.field-group > label,
.field-label-row label {
    margin: 0 0 9px;
    color: #36415a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row span {
    margin-bottom: 9px;
    color: #99a2b5;
    font-size: 11px;
}

.input-shell {
    position: relative;
}

.field-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 18px;
    color: #9aa6bc;
    font-size: 15px;
    text-align: center;
    transform: translateY(-50%);
    transition: color .2s ease;
}

body.signin .auth-card .form-control {
    width: 100%;
    height: 52px !important;
    margin: 0;
    padding: 0 50px 0 50px !important;
    border: 1px solid var(--login-line);
    border-radius: 13px !important;
    outline: none;
    color: #1b2741;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 22px rgba(18, 37, 72, .025);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body.signin .auth-card .form-control::placeholder {
    color: #abb3c3;
}

body.signin .auth-card .form-control:focus {
    border-color: rgba(41, 104, 240, .75) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(41, 104, 240, .09);
}

.input-shell:focus-within .field-icon {
    color: var(--login-blue);
}

.password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    outline: none;
    color: #8c97aa;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--login-blue);
    background: rgba(41, 104, 240, .08);
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 54px;
    margin-top: 31px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    outline: none;
    color: #fff;
    background: linear-gradient(135deg, var(--login-blue), var(--login-blue-dark));
    box-shadow: 0 14px 30px rgba(41, 104, 240, .22);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .04em;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-button:hover,
.login-button:focus-visible {
    color: #fff;
    box-shadow: 0 18px 36px rgba(41, 104, 240, .3);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button .fa {
    transition: transform .2s ease;
}

.login-button:hover .fa {
    transform: translateX(3px);
}

.field-group label.error {
    display: block;
    position: static;
    margin: 7px 2px 0;
    color: var(--login-danger);
    font-size: 11px;
    font-weight: 500;
}

body.signin .auth-card .form-control.error {
    border-color: rgba(223, 64, 90, .65) !important;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    color: #929bae;
    font-size: 11px;
}

.security-note .fa {
    color: #7d8aa2;
}

.access-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 70px;
    color: #a0a8b8;
    font-size: 10px;
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 120px !important;
}

body .layer-ext-moon-msg {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    color: #fff;
    background-color: rgba(7, 21, 44, .9);
    box-shadow: 0 18px 44px rgba(6, 19, 41, .28);
    backdrop-filter: blur(12px);
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 13px 25px;
    text-align: center;
}

@media (max-width: 1080px) {
    .login-page {
        grid-template-columns: minmax(380px, .9fr) minmax(450px, 1.1fr);
    }

    .brand-panel {
        padding-right: 50px;
        padding-left: 50px;
    }

    .brand-features {
        grid-template-columns: 1fr;
        max-width: 330px;
    }

    .feature-item:nth-child(2) {
        display: none;
    }
}

@media (max-width: 820px) {
    body.signin {
        background: var(--login-panel);
    }

    .login-page {
        display: block;
        min-height: 100vh;
    }

    .brand-panel {
        display: none;
    }

    .access-panel {
        min-height: 100vh;
        padding: max(30px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    }

    .auth-wrap {
        max-width: 430px;
    }

    .mobile-brand {
        display: flex;
        margin-bottom: clamp(54px, 10vh, 90px);
        color: var(--login-ink);
    }

    .mobile-brand .brand-mark {
        width: 34px;
        height: 34px;
        grid-template-columns: repeat(2, 9px);
        grid-template-rows: repeat(2, 9px);
        padding: 6px;
        border-radius: 11px;
    }

    .mobile-brand strong {
        max-width: calc(100vw - 110px);
        overflow: hidden;
        font-size: 16px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-header {
        margin-bottom: 34px;
    }

    .access-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-top: 52px;
    }
}

@media (max-width: 420px) {
    .access-panel {
        align-items: flex-start;
        padding-right: 20px;
        padding-left: 20px;
    }

    .mobile-brand {
        margin-bottom: 52px;
    }

    .auth-header h2 {
        font-size: 30px;
    }

    .field-group {
        margin-bottom: 20px;
    }

    body.signin .auth-card .form-control {
        height: 50px !important;
    }

    .login-button {
        height: 52px;
    }
}

@media (max-height: 720px) and (min-width: 821px) {
    .brand-panel {
        padding-top: 34px;
        padding-bottom: 30px;
    }

    .brand-copy {
        margin-top: 48px;
    }

    .brand-copy h1 {
        margin-top: 16px;
        margin-bottom: 16px;
        font-size: 42px;
    }

    .brand-features {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .auth-header {
        margin-bottom: 28px;
    }

    .field-group {
        margin-bottom: 18px;
    }

    .access-footer {
        margin-top: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
