/* Login is deliberately light, independent of the signed-in workspace theme. */
:root {
    color-scheme: light;
    --login-ink: #26364a;
    --login-muted: #64748b;
    --login-line: #cbd5e1;
    --login-accent: #1769e8;
    --login-accent-hover: #1257c4;
    --login-danger: #b83232;
    --el-color-primary: var(--login-accent);
    --el-font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
    font-family: var(--el-font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--login-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
.app { min-height: 100vh; min-height: 100svh; }
.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    min-height: 100vh;
    min-height: 100svh;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}
.login-shell.ready { opacity: 1; visibility: visible; }
.brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 104px 24px 32px;
    background: radial-gradient(ellipse at 46% 42%, #f0f8ff, #e4f1fc 64%, #eaf4fc);
}
.brand-scene { width: min(100%, 1040px, calc((100svh - 260px) * 1.5)); }
.site-visual { position: relative; width: 100%; aspect-ratio: 3 / 2; }
.site-art { display: block; width: 100%; height: auto; }
.site-data { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.data-trails path {
    stroke-dasharray: 2 98;
    animation: data-travel 5s linear infinite;
}
.data-trails path:nth-child(2) { animation-delay: -1.4s; }
.data-trails path:nth-child(3) { animation-delay: -3.2s; }
.data-trails path:nth-child(4) { animation-delay: -2s; }
.data-trails path:nth-child(5) { animation-delay: -.6s; }
.data-nodes circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: node-pulse 3.6s ease-out infinite;
}
.data-nodes circle:nth-child(even) { animation-delay: -1.8s; }
@keyframes data-travel { to { stroke-dashoffset: -100; } }
@keyframes node-pulse {
    0% { opacity: .8; transform: scale(.6); }
    70%, 100% { opacity: 0; transform: scale(1.8); }
}
.brand-copy { margin-top: 26px; text-align: center; }
.brand-copy > .brand-title, .brand-copy > .brand-subtitle { width: fit-content; max-width: 100%; margin-inline: auto; }
.brand-title { margin: 0; font-size: 26px; font-weight: 500; line-height: 1.5; }
.brand-subtitle { margin: 12px 0 0; font-size: 16px; color: #5d7086; }
.form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 48px clamp(32px, 5vw, 96px);
    background: #fff;
}
.brand-logo-row {
    position: absolute;
    top: 28px;
    left: clamp(24px, 3vw, 56px);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(58% - 64px);
    margin: 0;
}
.company-logo { display: block; flex: 0 0 auto; width: 48px; height: auto; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 500; line-height: 1.5; }
.form-inner { width: 100%; max-width: 400px; }
.form-title { margin-bottom: 32px; }
.form-title h1 { margin: 0; color: var(--login-ink); font-size: 28px; font-weight: 600; line-height: 1.5; }
.form-title p { margin: 8px 0 0; color: var(--login-muted); font-size: 14px; line-height: 1.6; }
.login-form .el-form-item { position: relative; margin-bottom: 26px; }
.login-form .el-form-item__content { display: block; line-height: 1.5; }
.input-label { display: block; margin-bottom: 8px; color: var(--login-ink); font-size: 14px; font-weight: 400; line-height: 22px; }
.login-form .el-input { font-family: inherit; font-size: 14px; --el-input-text-color: var(--login-ink); --el-input-placeholder-color: #748297; }
.login-form .el-input__wrapper {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--login-line) inset;
    transition: box-shadow .15s ease;
}
.login-form .el-input__wrapper:hover { box-shadow: 0 0 0 1px #8fa7c6 inset; }
.login-form .el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--login-accent) inset, 0 0 0 3px #1769e812; }
.login-form .el-form-item.is-error .el-input__wrapper { box-shadow: 0 0 0 1px var(--login-danger) inset; }
.login-form .el-input__inner { height: 44px; font-family: inherit; font-size: 14px; font-weight: 400; }
/* Password managers and browser autofill must match the white input wrapper. */
.login-form .el-input__inner { background-color: transparent !important; }
.login-form .el-input__inner:-webkit-autofill,
.login-form .el-input__inner:-webkit-autofill:hover,
.login-form .el-input__inner:-webkit-autofill:focus,
.login-form .el-input__inner:autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: var(--login-ink) !important;
    caret-color: var(--login-ink);
}
.input-icon { display: block; width: 18px; height: 18px; object-fit: contain; opacity: .75; }
.login-form .el-input__prefix-inner > :last-child { margin-right: 10px; }
.login-form .el-input__suffix { color: var(--login-muted); }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; width: 100%; }
.captcha-image-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 46px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--login-line);
    border-radius: 6px;
    background: #f2f7fd;
    color: var(--login-muted);
    cursor: pointer;
}
.captcha-image-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.captcha-image-button:hover { border-color: var(--login-accent); }
.captcha-image-button:disabled { cursor: not-allowed; opacity: .6; }
.captcha-image-placeholder { font-size: 13px; }
.login-form .el-form-item__error { position: absolute; top: 100%; left: 0; padding-top: 4px; color: var(--login-danger); font-size: 12px; line-height: 16px; }
.form-row { display: flex; align-items: center; min-height: 32px; }
.login-form .form-remember-item { margin-bottom: 18px; }
.login-form .form-submit-item { margin-bottom: 0; }
.login-form .el-checkbox__label { font-size: 14px; font-weight: 400; line-height: 22px; color: var(--login-muted); }
.login-form .el-checkbox__inner { width: 16px; height: 16px; border-radius: 3px; }
.login-form .el-checkbox__inner::after { left: 5px; top: 2px; }
.login-btn.el-button {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    background: var(--login-accent);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    box-shadow: none;
}
.login-btn.el-button:hover { background: var(--login-accent-hover); }
.login-btn.el-button.is-disabled { background: #86ace5; cursor: not-allowed; }
.captcha-image-button:focus-visible,
.login-btn.el-button:focus-visible, .workspace-select-item:focus-visible { outline: 3px solid #1769e870; outline-offset: 3px; }
.login-mask { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: #ffffffc9; }
.login-progress { width: min(260px, 72vw); padding: 24px; border: 1px solid #e1e8f0; border-radius: 8px; background: #fff; }
.login-progress p { margin: 0 0 16px; font-size: 14px; }
.login-progress span { display: block; height: 4px; overflow: hidden; border-radius: 4px; background: #e8eff8; }
.login-progress span::after { content: ""; display: block; width: 42%; height: 100%; background: var(--login-accent); animation: login-progress 1.15s ease-in-out infinite alternate; }
@keyframes login-progress { to { transform: translateX(138%); } }
@media (max-width: 1200px) and (min-width: 981px) {
    .form-panel { padding-left: 32px; padding-right: 32px; }
    .brand-name { font-size: 20px; }
    .brand-title { font-size: 24px; }
    .brand-subtitle { font-size: 14px; }
}
@media (max-width: 980px) {
    .login-shell { grid-template-columns: minmax(0, 1fr); }
    .brand-panel { display: none; }
    .form-panel { min-height: 100svh; padding: 160px 28px 64px; }
    .brand-logo-row { top: 40px; left: 28px; max-width: calc(100% - 56px); }
}
@media (max-width: 420px) {
    .form-panel { padding: 136px 24px 40px; }
    .brand-logo-row { top: 32px; left: 24px; max-width: calc(100% - 48px); gap: 12px; }
    .company-logo { width: 40px; }
    .brand-name { font-size: 18px; }
    .form-title h1 { font-size: 26px; }
    .captcha-row { grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; }
    .captcha-image-button { width: 104px; }
}
/* Fit shorter laptop viewports without hiding controls or disabling scrolling. */
@media (max-height: 760px) {
    .form-panel { padding-top: 24px; padding-bottom: 24px; }
    .brand-logo-row { top: 24px; }
    .form-title { margin-bottom: 20px; }
    .brand-copy { margin-top: 18px; }
}
@media (max-height: 640px) {
    .form-panel { padding-top: 16px; padding-bottom: 16px; }
    .brand-logo-row { top: 20px; }
    .company-logo { width: 40px; }
    .form-title h1 { font-size: 26px; line-height: 1.4; }
    .form-title p { margin-top: 4px; }
    .form-title { margin-bottom: 16px; }
    .input-label { margin-bottom: 4px; }
    .login-form .el-form-item { margin-bottom: 24px; }
    .login-form .el-input__wrapper { min-height: 42px; }
    .login-form .el-input__inner { height: 40px; }
    .captcha-image-button { height: 42px; }
    .login-form .form-remember-item { margin-bottom: 12px; }
    .login-form .form-submit-item { margin-bottom: 0; }
}
@media (max-width: 980px) and (max-height: 760px) {
    .form-panel { padding-top: 100px; padding-bottom: 24px; }
}
@media (max-width: 980px) and (max-height: 640px) {
    .form-panel { padding-top: 88px; padding-bottom: 16px; }
}
/* A diagonal highlight travels out and back; normal text remains the fallback. */
.brand-title { --shine-base: var(--login-ink); }
.brand-subtitle { --shine-base: #5d7086; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .brand-title, .brand-subtitle {
        background-image: linear-gradient(135deg,
            var(--shine-base) 40%, #165ca0 47%, #2877ac 50%,
            #165ca0 53%, var(--shine-base) 60%);
        background-size: 300% 300%;
        background-position: 100% 100%;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: copy-shimmer 4s ease-in-out infinite alternate;
    }
    .brand-subtitle { animation-delay: .25s; }
}
@keyframes copy-shimmer {
    0%, 10% { background-position: 100% 100%; }
    90%, 100% { background-position: 0% 0%; }
}
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
    .brand-title, .brand-subtitle {
        background: none;
        color: var(--shine-base);
        -webkit-text-fill-color: currentColor;
        animation: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .data-nodes { opacity: .4; }
}
        .workspace-select-dialog.el-dialog { max-width: calc(100vw - 32px); border-radius: 8px; }
        .workspace-select-head { margin-bottom: 16px; }
        .workspace-select-head strong { display: block; color: #17243b; font-size: 16px; line-height: 24px; }
        .workspace-select-head span { display: block; margin-top: 4px; color: #6a7890; font-size: 13px; line-height: 20px; }
        .workspace-select-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            max-height: 390px;
            overflow-y: auto;
        }
        .workspace-select-item {
            min-width: 0;
            padding: 14px 16px;
            border: 1px solid #dce5f1;
            border-radius: 6px;
            background: #fff;
            cursor: pointer;
            text-align: left;
            transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
        }
        .workspace-select-item:hover,
        .workspace-select-item.is-selected {
            border-color: #2b6de0;
            background: #f5f8ff;
            box-shadow: 0 0 0 2px rgba(43, 109, 224, .1);
        }
        .workspace-select-item strong,
        .workspace-select-item span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            letter-spacing: 0;
        }
        .workspace-select-item strong { color: #17243b; font-size: 14px; line-height: 22px; }
        .workspace-select-item span { margin-top: 4px; color: #5e6d83; font-size: 13px; line-height: 20px; }
        .workspace-select-item small { display: inline-block; margin-top: 9px; color: #2b6de0; font-size: 12px; }

        @media (max-width: 640px) {
            .workspace-select-list { grid-template-columns: 1fr; }
        }
