:root {
    --login-blue: #2f6fed;
    --login-blue-dark: #2459c4;
    --login-blue-soft: #edf3ff;
    --login-teal: #16ad9b;
    --login-teal-soft: #e9f8f5;
    --login-ink: #17233d;
    --login-text: #43516c;
    --login-muted: #8793aa;
    --login-line: #dce5f2;
    --login-bg: #edf3fb;
    --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-bg);
    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: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
    overflow: hidden;
    isolation: isolate;
}

.page-pattern {
    position: fixed;
    z-index: -3;
    inset: 0;
    opacity: .42;
    background-image:
        linear-gradient(rgba(47, 111, 237, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 111, 237, .035) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
    mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
}

.page-orb {
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(4px);
}

.page-orb-one {
    top: -220px;
    right: -120px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(47, 111, 237, .18), rgba(47, 111, 237, 0) 69%);
}

.page-orb-two {
    bottom: -250px;
    left: -140px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(22, 173, 155, .14), rgba(22, 173, 155, 0) 70%);
}

.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(520px, 1.15fr) minmax(440px, .85fr);
    width: min(1240px, 100%);
    min-height: min(740px, calc(100vh - 56px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 30px;
    background: #fff;
    box-shadow:
        0 30px 80px rgba(43, 67, 107, .14),
        0 8px 24px rgba(43, 67, 107, .06);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(38px, 4vw, 58px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 86% 12%, rgba(82, 152, 255, .42), transparent 32%),
        radial-gradient(circle at 4% 92%, rgba(22, 173, 155, .24), transparent 34%),
        linear-gradient(145deg, #173d83 0%, #15336d 42%, #102954 100%);
}

.brand-panel::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -90px;
    width: 270px;
    height: 270px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255, 255, 255, .025),
        0 0 0 90px rgba(255, 255, 255, .018);
}

.brand-panel::after {
    content: "";
    position: absolute;
    right: 34px;
    bottom: 92px;
    width: 130px;
    height: 130px;
    opacity: .22;
    background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px);
    background-size: 14px 14px;
    -webkit-mask-image: linear-gradient(135deg, #000, transparent 80%);
    mask-image: linear-gradient(135deg, #000, transparent 80%);
}

.brand-header,
.mobile-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    flex: 0 0 42px;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 9px;
    border-radius: 13px;
    background: linear-gradient(145deg, #54d8ca, #3f7df2);
    box-shadow: 0 12px 28px rgba(9, 23, 52, .25);
}

.brand-mark span {
    display: block;
    border-radius: 3px;
    background: rgba(255, 255, 255, .96);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
    opacity: .58;
}

.brand-name {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.brand-name strong {
    max-width: 380px;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-name small,
.mobile-brand small {
    margin-top: 3px;
    color: rgba(218, 230, 249, .56);
    font-size: 10px;
    letter-spacing: .08em;
}

.brand-copy {
    position: relative;
    z-index: 1;
    max-width: 590px;
    margin-top: clamp(58px, 8vh, 92px);
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #9ce8df;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .08em;
}

.brand-eyebrow .fa {
    font-size: 7px;
    box-shadow: 0 0 12px rgba(92, 230, 214, .65);
}

.brand-copy h1 {
    margin: 19px 0 17px;
    color: #fff;
    font-size: clamp(38px, 3.3vw, 52px);
    font-weight: 700;
    line-height: 1.23;
    letter-spacing: -.045em;
}

.brand-copy h1 em {
    color: #9ce8df;
    font-style: normal;
}

.brand-copy p {
    max-width: 520px;
    margin: 0;
    color: rgba(220, 231, 249, .66);
    font-size: 14px;
    line-height: 1.85;
}

.workspace-preview {
    position: relative;
    z-index: 2;
    width: min(100%, 590px);
    margin-top: 38px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 20px;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 24px 54px rgba(4, 17, 43, .2);
    backdrop-filter: blur(16px);
}

.preview-topbar,
.preview-title,
.flow-heading {
    display: flex;
    align-items: center;
}

.preview-topbar,
.flow-heading {
    justify-content: space-between;
}

.preview-title {
    gap: 11px;
}

.preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: #8de0d7;
    background: rgba(90, 225, 209, .12);
}

.preview-title div {
    display: flex;
    flex-direction: column;
}

.preview-title strong {
    color: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 650;
}

.preview-title small {
    margin-top: 2px;
    color: rgba(216, 229, 248, .45);
    font-size: 9px;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(95, 225, 209, .13);
    border-radius: 999px;
    color: #a8e9e1;
    background: rgba(49, 191, 174, .09);
    font-size: 10px;
}

.online-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #48d6c5;
    box-shadow: 0 0 9px rgba(72, 214, 197, .75);
}

.preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 17px;
}

.preview-metric {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: rgba(7, 25, 57, .27);
}

.preview-metric > span {
    color: rgba(219, 231, 249, .5);
    font-size: 9px;
}

.preview-metric strong {
    margin: 5px 0 6px;
    color: #fff;
    font-size: 17px;
    font-weight: 650;
}

.preview-metric small {
    overflow: hidden;
    color: #83decf;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-metric-blue small {
    color: #a8c5ff;
}

.preview-metric-teal small {
    color: #8de1d7;
}

.preview-flow {
    margin-top: 11px;
    padding: 13px 14px 11px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 13px;
    background: rgba(7, 25, 57, .18);
}

.flow-heading strong {
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
    font-weight: 600;
}

.flow-heading span {
    color: rgba(216, 229, 248, .42);
    font-size: 9px;
}

.flow-track {
    display: flex;
    align-items: center;
    margin: 12px 10px 7px;
}

.flow-node {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    color: rgba(255, 255, 255, .38);
    background: rgba(255, 255, 255, .06);
    font-size: 8px;
}

.flow-node.is-complete {
    border-color: rgba(67, 206, 190, .35);
    color: #fff;
    background: #24af9f;
}

.flow-node.is-active {
    border-color: rgba(105, 151, 255, .48);
    color: #fff;
    background: #3b75e5;
    box-shadow: 0 0 0 4px rgba(59, 117, 229, .13);
}

.flow-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, .1);
}

.flow-line.is-complete {
    background: #24af9f;
}

.flow-line.is-active {
    background: linear-gradient(90deg, #24af9f, #3b75e5);
}

.flow-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(216, 229, 248, .43);
    font-size: 8px;
}

.brand-footer {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: auto;
    padding-top: 30px;
    color: rgba(220, 231, 249, .5);
    font-size: 10px;
}

.brand-footer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.brand-footer .fa {
    color: #79d6cb;
}

.access-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 48px clamp(42px, 5vw, 72px);
    background:
        radial-gradient(circle at 100% 0%, rgba(47, 111, 237, .055), transparent 29%),
        #fff;
}

.auth-wrap {
    width: min(100%, 420px);
}

.mobile-brand {
    display: none;
}

.auth-card {
    width: 100%;
}

.auth-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
}

.auth-icon {
    display: inline-flex;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid #dce7fb;
    border-radius: 15px;
    color: var(--login-blue);
    background: var(--login-blue-soft);
    box-shadow: 0 10px 24px rgba(47, 111, 237, .09);
    font-size: 20px;
}

.auth-header > div {
    min-width: 0;
}

.auth-eyebrow {
    color: var(--login-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.auth-header h2 {
    margin: 4px 0 5px;
    color: var(--login-ink);
    font-size: 30px;
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: -.035em;
}

.auth-header p {
    margin: 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-header p strong {
    color: #53617a;
    font-weight: 600;
}

.field-group {
    position: relative;
    margin-bottom: 20px;
}

.field-group > label,
.field-label-row label {
    margin: 0 0 9px;
    color: #35425d;
    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: #a0aabc;
    font-size: 10px;
}

.input-shell {
    position: relative;
}

.field-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 18px;
    color: #9aa7bc;
    font-size: 15px;
    text-align: center;
    transform: translateY(-50%);
    transition: color .2s ease;
}

body.signin .auth-card .form-control {
    width: 100%;
    height: 54px !important;
    margin: 0;
    padding: 0 50px 0 50px !important;
    border: 1px solid var(--login-line);
    border-radius: 13px !important;
    outline: none;
    color: #1e2b45;
    background: #f8fafd;
    box-shadow: none;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body.signin .auth-card .form-control::placeholder {
    color: #aeb7c6;
}

body.signin .auth-card .form-control:hover {
    border-color: #cbd8e9;
    background: #fff;
}

body.signin .auth-card .form-control:focus {
    border-color: rgba(47, 111, 237, .72) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, .09);
}

.input-shell:focus-within .field-icon {
    color: var(--login-blue);
}

.password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    outline: none;
    color: #8d99ad;
    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: var(--login-blue-soft);
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 54px;
    margin-top: 28px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    outline: none;
    color: #fff;
    background: linear-gradient(135deg, #3a78f1, var(--login-blue-dark));
    box-shadow: 0 14px 30px rgba(47, 111, 237, .22);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .05em;
    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(47, 111, 237, .29);
    filter: brightness(1.035);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button .fa {
    font-size: 13px;
    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, .62) !important;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 11px 13px;
    border: 1px solid #e3eaf4;
    border-radius: 12px;
    background: #f8fafd;
}

.security-note-icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--login-teal);
    background: var(--login-teal-soft);
    font-size: 12px;
}

.security-note div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.security-note strong {
    color: #58657c;
    font-size: 10px;
    font-weight: 650;
}

.security-note small {
    margin-top: 2px;
    color: #98a3b4;
    font-size: 9px;
}

.access-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 42px;
    color: #a0a9b9;
    font-size: 9px;
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 120px !important;
}

body .layer-ext-moon-msg {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    color: #fff;
    background-color: rgba(18, 35, 67, .94);
    box-shadow: 0 18px 44px rgba(20, 42, 80, .26);
    backdrop-filter: blur(12px);
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 13px 25px;
    text-align: center;
}

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: minmax(450px, 1fr) minmax(410px, .9fr);
    }

    .brand-panel {
        padding-right: 40px;
        padding-left: 40px;
    }

    .brand-copy h1 {
        font-size: 40px;
    }

    .preview-metric {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 880px) {
    body.signin {
        background: var(--login-bg);
    }

    .login-page {
        align-items: flex-start;
        padding: 22px;
        overflow: visible;
    }

    .login-shell {
        display: block;
        width: min(100%, 540px);
        min-height: auto;
        border-radius: 24px;
    }

    .brand-panel {
        display: none;
    }

    .access-panel {
        min-height: calc(100vh - 44px);
        padding: max(38px, env(safe-area-inset-top)) 38px max(30px, env(safe-area-inset-bottom));
        border-radius: 24px;
    }

    .auth-wrap {
        max-width: 430px;
    }

    .mobile-brand {
        display: flex;
        margin-bottom: clamp(50px, 9vh, 76px);
    }

    .mobile-brand > div:last-child {
        display: flex;
        min-width: 0;
        flex-direction: column;
    }

    .mobile-brand strong {
        max-width: calc(100vw - 150px);
        overflow: hidden;
        color: var(--login-ink);
        font-size: 16px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-brand small {
        color: #9aa5b7;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0;
    }

    .login-shell,
    .access-panel {
        border-radius: 0;
    }

    .login-shell {
        border: 0;
        box-shadow: none;
    }

    .access-panel {
        min-height: 100vh;
        padding: max(28px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    }

    .mobile-brand {
        margin-bottom: 46px;
    }

    .auth-header {
        gap: 13px;
        margin-bottom: 31px;
    }

    .auth-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

    .auth-header h2 {
        font-size: 27px;
    }

    .field-group {
        margin-bottom: 18px;
    }

    body.signin .auth-card .form-control,
    .login-button {
        height: 52px !important;
    }

    .access-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-top: 34px;
    }
}

@media (max-height: 760px) and (min-width: 881px) {
    .login-page {
        align-items: flex-start;
        overflow: auto;
    }

    .login-shell {
        min-height: 680px;
    }

    .brand-copy {
        margin-top: 42px;
    }

    .brand-copy h1 {
        margin-top: 14px;
        margin-bottom: 13px;
        font-size: 38px;
    }

    .workspace-preview {
        margin-top: 26px;
    }

    .auth-header {
        margin-bottom: 28px;
    }

    .field-group {
        margin-bottom: 16px;
    }

    .access-footer {
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
