:root {
    --auth-blue: #1a6cb4;
    --auth-blue-deep: #14609a;
    --auth-ink: #101828;
    --auth-text: #344054;
    --auth-muted: #667085;
    --auth-quiet: #98a2b3;
    --auth-line: #e4e7ec;
    --auth-line-strong: #d0d5dd;
    --auth-field: #e8f1fa;
    --auth-panel: #ffffff;
    --auth-chip: #f2f4f7;
    --auth-radius: 12px;
    --auth-shadow: 0 8px 18px rgba(20, 96, 160, 0.28);
    --auth-ring: 0 0 0 4px rgba(26, 108, 180, 0.16);
    --auth-error-bg: #fef3f2;
    --auth-error-text: #b42318;
    --auth-error-border: #fecdca;
    --auth-ok-bg: #ecfdf3;
    --auth-ok-text: #067647;
    --auth-ok-border: #abefc6;
    --auth-hero: url("../img/background.jpg");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

[hidden] {
    display: none !important;
}

body.auth-body {
    min-height: 100dvh;
    color: var(--auth-ink);
    background: #0c2f66;
    font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.auth-skip {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--auth-ink);
}

.auth-skip:focus {
    top: 12px;
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.13fr) minmax(400px, 1fr);
}

.auth-showcase {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f7fbff;
    background: #0d3874;
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-color: #3a5878;
    background-image: var(--auth-hero);
    background-repeat: no-repeat;
    background-position: center 46%;
    background-size: cover;
    background-blend-mode: multiply;
    filter: saturate(0.9) contrast(1.04);
}

.auth-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 24, 42, 0.34) 0%, rgba(16, 36, 58, 0.12) 46%, rgba(8, 22, 40, 0.42) 100%);
}

.auth-showcase-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 28px 48px 24px;
}

.auth-kicker {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
}

.auth-kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 12px 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(6, 18, 40, 0.28);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18);
}

.auth-kicker-meta {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.auth-showcase-main {
    max-width: 720px;
    margin-top: 36px;
}

.auth-showcase-title {
    margin: 0;
    font-size: clamp(30px, 2.6vw, 40px);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: 0.01em;
    text-shadow: 0 8px 24px rgba(6, 20, 48, 0.28);
}

.auth-showcase-desc {
    max-width: 38em;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.75;
}

.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 680px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.auth-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    text-align: center;
}

.auth-stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
}

.auth-stat-icon svg {
    width: 26px;
    height: 26px;
}

.auth-stat-icon-blue {
    background: #2f6fed;
}

.auth-stat-icon-teal {
    background: #14b8a6;
}

.auth-stat-icon-line {
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.auth-stat strong {
    display: block;
    width: 100%;
    margin-top: 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
}

.auth-stat-label {
    display: block;
    width: 100%;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.auth-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: auto 0 0;
    padding: 32px 0 0;
    list-style: none;
}

.auth-tags li {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.auth-panel {
    display: flex;
    align-items: safe center;
    justify-content: center;
    min-height: 100dvh;
    padding: 28px 40px max(20px, env(safe-area-inset-bottom));
    background: var(--auth-panel);
}

.auth-card {
    width: min(460px, 100%);
}

.auth-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-lockup {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 232px;
}

.auth-logo {
    display: block;
    width: 100%;
    height: auto;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--auth-chip);
    color: #475467;
    font-size: 13px;
    white-space: nowrap;
}

.auth-card h1 {
    margin: 22px 0 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.auth-lead {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-lead strong {
    color: var(--auth-ink);
    font-weight: 700;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 18px;
    padding: 4px;
    border-radius: var(--auth-radius);
    background: #f2f4f7;
}

.auth-tab {
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--auth-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.auth-tab[aria-selected="true"] {
    background: #fff;
    color: var(--auth-blue);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 14px rgba(16, 24, 40, 0.05);
}

.auth-form {
    margin: 0;
}

.auth-alert {
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert-error {
    border: 1px solid var(--auth-error-border);
    background: var(--auth-error-bg);
    color: var(--auth-error-text);
}

.auth-alert-ok {
    border: 1px solid var(--auth-ok-border);
    background: var(--auth-ok-bg);
    color: var(--auth-ok-text);
}

.auth-field {
    margin-top: 16px;
}

.auth-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-field-head label {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 650;
}

.auth-control {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d5e4f4;
    border-radius: var(--auth-radius);
    background: var(--auth-field);
}

.auth-control:focus-within {
    border-color: var(--auth-blue);
    background: #fff;
    box-shadow: var(--auth-ring);
}

.auth-control-icon {
    flex: none;
    color: #98a2b3;
}

.auth-control input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--auth-ink);
    font-size: 16px;
}

.auth-control input::placeholder {
    color: #b0b8c6;
}

.auth-text-btn,
.auth-quiet {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.auth-text-btn {
    color: var(--auth-blue);
    font-size: 13px;
}

.auth-quiet {
    color: var(--auth-quiet);
    font-size: 13px;
}

.auth-text-btn:hover,
.auth-quiet:hover {
    text-decoration: underline;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--auth-radius);
    font-size: 16px;
    font-weight: 650;
    cursor: pointer;
}

.auth-btn-primary {
    width: 100%;
    margin-top: 18px;
    color: #fff;
    background: linear-gradient(90deg, #14639f 0%, #1b73c0 100%);
    box-shadow: var(--auth-shadow);
}

.auth-btn-primary:hover {
    background: linear-gradient(90deg, #125890 0%, #1667b0 100%);
}

.auth-btn-primary:disabled {
    opacity: 0.72;
    cursor: progress;
}

.auth-btn-primary[aria-busy="true"] svg {
    display: none;
}

.auth-btn-secondary {
    border: 1px solid var(--auth-line-strong);
    background: #fff;
    color: var(--auth-text);
}

.auth-btn-secondary:hover {
    background: #f8fafc;
}

.auth-wecom {
    margin-top: 28px;
    padding: 32px 20px 24px;
    border: 1px dashed var(--auth-line-strong);
    border-radius: 16px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-wecom h2 {
    margin: 12px 0 8px;
    color: var(--auth-ink);
    font-size: 18px;
}

.auth-wecom p {
    margin: 0 auto 16px;
    max-width: 28em;
    font-size: 14px;
    line-height: 1.7;
}

.auth-wecom .auth-btn-secondary {
    min-width: 160px;
}

.auth-footnote {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 24px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.auth-scopes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.auth-scope {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #e7edf5;
    border-radius: var(--auth-radius);
    background: var(--auth-field);
    font-weight: 550;
    cursor: pointer;
}

.auth-scope input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--auth-blue);
}

.auth-approved {
    margin: 14px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.auth-actions .auth-btn {
    flex: 1;
    margin-top: 0;
}

.auth-notice {
    position: fixed;
    inset: 0;
    width: min(320px, calc(100vw - 32px));
    height: fit-content;
    margin: auto;
    padding: 22px 22px 18px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: var(--auth-text);
    text-align: center;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

.auth-notice-title {
    margin: 0;
    color: var(--auth-ink);
    font-size: 18px;
    font-weight: 700;
}

.auth-notice-text {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.7;
}

.auth-notice-dismiss {
    min-width: 108px;
    margin-top: 16px;
}

.auth-notice::backdrop {
    background: rgba(16, 24, 40, 0.28);
}

button:focus-visible,
.auth-tab:focus-visible,
.auth-scope input:focus-visible {
    outline: 2px solid var(--auth-blue);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .auth-showcase-inner {
        padding: 32px 32px 24px;
    }

    .auth-panel {
        padding-inline: 28px;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        min-height: 168px;
    }

    .auth-showcase-inner {
        padding: 22px 20px 18px;
    }

    .auth-showcase-main {
        margin-top: 18px;
    }

    .auth-showcase-title {
        font-size: 24px;
    }

    .auth-stats,
    .auth-tags,
    .auth-showcase-desc {
        display: none;
    }

    .auth-panel {
        min-height: 0;
        align-items: stretch;
        padding: 8px 16px 28px;
    }

    .auth-card h1 {
        margin-top: 22px;
        font-size: 24px;
    }
}

@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .auth-stat {
        background: rgba(10, 36, 78, 0.46);
    }
}
