:root {
    color-scheme: light;
    --auth-bg: #f4f5f7;
    --auth-surface: #ffffff;
    --auth-text: #262626;
    --auth-muted: #737373;
    --auth-border: #d9d9d9;
    --auth-primary: #2563eb;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --auth-bg: #080e19;
    --auth-surface: #0f192a;
    --auth-text: #e7eefb;
    --auth-muted: #9aa8bd;
    --auth-border: rgba(124, 164, 218, 0.24);
    --auth-primary: #60a5fa;
}

* {
    box-sizing: border-box;
}

html,
body,
#auth-root {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    color: var(--auth-text);
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--auth-bg);
    transition: background-color 180ms ease, color 180ms ease;
}

.auth-shell {
    display: grid;
    place-content: center;
    gap: 14px;
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 24px;
}

.auth-card.ant-card {
    width: 472px;
    max-width: calc(100vw - 48px);
    border-color: var(--auth-border);
    border-radius: 16px;
    background: var(--auth-surface);
    box-shadow: 0 14px 44px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .auth-card.ant-card {
    box-shadow: none;
}

.auth-card .ant-card-body {
    padding: 26px 34px 30px;
}

.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-toolbar img {
    width: 42px;
    height: 42px;
}

.auth-heading {
    margin: 26px 0 18px;
}

.auth-heading .auth-kicker {
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.auth-heading h1.ant-typography {
    margin: 8px 0 6px;
    color: var(--auth-text);
    font-size: 30px;
    line-height: 1.2;
}

.auth-heading p.ant-typography {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-alerts {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
}

.auth-alerts:empty {
    display: none;
}

.auth-alerts .ant-alert {
    border-radius: 8px;
}

.auth-card .ant-tabs-nav {
    margin-bottom: 20px;
}

.auth-card .ant-tabs-tab {
    min-width: 88px;
    justify-content: center;
}

.auth-card .ant-form-item {
    margin-bottom: 18px;
}

.auth-card .ant-form-item-label > label,
.auth-card .ant-checkbox-wrapper,
.auth-card .ant-typography {
    color: var(--auth-text);
}

.auth-captcha-row .ant-form-item,
.auth-code-row .ant-form-item {
    flex: 1 1 auto;
}

.auth-captcha-button.ant-btn {
    width: 160px;
    color: var(--auth-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.auth-code-row > .ant-btn {
    width: 138px;
}

.auth-link-button.ant-btn {
    margin-top: 8px;
}

.auth-footnote {
    display: block;
    text-align: center;
}

@media (max-width: 560px) {
    .auth-shell {
        display: block;
        padding: 20px 16px;
    }

    .auth-card.ant-card {
        max-width: 100%;
    }

    .auth-card .ant-card-body {
        padding: 22px 22px 26px;
    }

    .auth-captcha-button.ant-btn,
    .auth-code-row > .ant-btn {
        width: 132px;
        padding-inline: 10px;
    }

    .auth-card .ant-tabs-tab {
        min-width: 0;
    }
}

/* Desktop workspace entry; keep the same account flows at every viewport. */
.auth-shell { width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(480px, 1fr); gap: 0; padding: 0; margin: 0; place-content: stretch; }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 52px clamp(36px, 5.2vw, 88px); color: #eaf1ff; background: radial-gradient(ellipse at 5% 95%, #25476a 0, transparent 60%), #14263f; position: relative; overflow: hidden; }
.auth-brand::after { content: ''; position: absolute; width: 540px; height: 540px; right: -340px; top: 15%; border: 1px solid #ffffff12; border-radius: 50%; box-shadow: 0 0 0 70px #ffffff03, 0 0 0 140px #ffffff02; pointer-events: none; }
.auth-brand-logo { display: flex; gap: 14px; align-items: center; color: #fff; text-decoration: none; font-size: 24px; font-weight: 650; position: relative; z-index: 1; }
.auth-brand-logo img { width: 46px; height: 46px; }
.auth-brand-caption { display: block; color: #b0c0d7; font-size: 12px; font-weight: 400; margin-top: 3px; letter-spacing: 2px; }
.auth-brand-content { padding: 68px 0; position: relative; z-index: 1; }
.auth-eyebrow { font-size: 13px; letter-spacing: 3px; color: #99bbdf; }
.auth-brand h1 { font-size: clamp(34px, 3vw, 52px); font-weight: 600; line-height: 1.5; letter-spacing: -1px; margin: 24px 0; color: #fff; }
.auth-brand-content > p { font-size: 16px; line-height: 1.9; color: #b6c7dc; margin: 0; }
.auth-capabilities { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 64px; padding-top: 26px; border-top: 1px solid #ffffff20; }
.auth-capabilities span { display: block; color: #86a8cc; font-size: 12px; margin-bottom: 12px; }
.auth-capabilities strong { font-size: 16px; font-weight: 500; }
.auth-capabilities p { color: #9fb3cd; font-size: 12px; line-height: 1.8; margin: 10px 0 0; }
.auth-brand-footer { font-size: 12px; color: #8fa7c2; }
.auth-form-panel { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 44px clamp(32px, 5vw, 80px); background: var(--auth-surface); }
.auth-card.ant-card { width: 440px; max-width: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.auth-card .ant-card-body { padding: 0; }
.auth-panel-label { color: var(--auth-muted); font-size: 13px; }
.auth-heading { margin: 46px 0 28px; }
.auth-heading .auth-kicker { display: none; }
.auth-heading h2.ant-typography { margin: 0 0 12px; color: var(--auth-text); font-size: 32px; font-weight: 600; }
.auth-heading p.ant-typography { color: var(--auth-muted); font-size: 14px; }
.auth-card .ant-tabs-nav { margin-bottom: 28px; }
.auth-card .ant-form-item { margin-bottom: 22px; }
.auth-footnote { margin-top: 36px; font-size: 12px; color: var(--auth-muted); }
@media (min-width: 1800px) { .auth-brand-content { max-width: 680px; } .auth-card.ant-card { width: 480px; } }
@media (max-width: 1000px) { .auth-shell { grid-template-columns: minmax(0,1fr) minmax(400px,1fr); } .auth-brand { padding: 36px 30px; } .auth-capabilities { grid-template-columns: 1fr; gap: 18px; margin-top: 36px; } .auth-capabilities div { display: flex; align-items: baseline; gap: 12px; } .auth-capabilities span { margin: 0; } .auth-capabilities p { display: none; } .auth-form-panel { padding: 36px; } }
@media (max-width: 760px) { .auth-shell { display: block; } .auth-brand { min-height: auto; padding: 26px 24px; } .auth-brand-content, .auth-brand-footer { display: none; } .auth-brand-logo { font-size: 21px; } .auth-form-panel { padding: 28px 24px 40px; min-height: calc(100vh - 98px); } .auth-heading { margin: 26px 0; } .auth-heading h2.ant-typography { font-size: 28px; } .auth-footnote { margin-top: 24px; } }
