:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-ink: #172033;
    --auth-muted: #6b7587;
    --auth-line: #e4e9f1;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    margin: 0;
    color: var(--auth-ink);
    background: #f4f7fb;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(440px, .95fr);
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: clamp(48px, 8vw, 112px);
    color: #fff;
    background:
        radial-gradient(circle at 18% 18%, rgba(122, 162, 255, .52), transparent 24rem),
        linear-gradient(145deg, #162a5c 0%, #1d4ed8 56%, #3b82f6 100%);
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.auth-brand::before {
    right: -160px;
    bottom: -210px;
    width: 520px;
    height: 520px;
}

.auth-brand::after {
    right: -40px;
    bottom: -90px;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, .04);
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 70px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.auth-brand-logo img {
    width: auto;
    height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    height: 28px;
    margin-bottom: 18px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
}

.auth-brand h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -.04em;
}

.auth-brand p {
    max-width: 480px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .75);
    font-size: 16px;
    line-height: 1.9;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(32px, 7vw, 96px);
    background: #fff;
}

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

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-header h2 {
    margin: 0 0 9px;
    color: var(--auth-ink);
    font-size: 30px;
    font-weight: 720;
    letter-spacing: -.025em;
}

.auth-card-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
}

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

.auth-card .layui-input-inline {
    float: none;
    width: 100%;
    margin: 0;
}

.auth-card .layui-input {
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    color: var(--auth-ink);
    background: #fafbfd;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-card .layui-input:focus {
    border-color: rgba(37, 99, 235, .65);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .09);
}

.auth-card .auth-submit {
    height: 48px;
    border-radius: 11px;
    background: var(--auth-primary) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
    font-size: 15px;
    font-weight: 600;
    transition: background .2s, transform .2s;
}

.auth-card .auth-submit:hover {
    background: var(--auth-primary-dark) !important;
    transform: translateY(-1px);
}

.auth-error {
    display: block;
    margin: -18px 0 20px;
    color: #dc2626;
    font-size: 13px;
}

.auth-captcha {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.auth-captcha img {
    height: 48px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    cursor: pointer;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 18px;
    margin-top: 22px;
    font-size: 13px;
}

.auth-links a {
    color: var(--auth-muted);
}

.auth-links a:hover,
.auth-links .auth-link-primary {
    color: var(--auth-primary);
}

.auth-note {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--auth-line);
    color: #98a1b1;
    font-size: 12px;
    text-align: center;
}

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

    .auth-brand {
        min-height: 260px;
        padding: 38px 28px 44px;
    }

    .auth-brand-logo {
        margin-bottom: 34px;
    }

    .auth-brand h1 {
        max-width: 650px;
        font-size: clamp(30px, 8vw, 44px);
    }

    .auth-brand p {
        margin-top: 14px;
    }

    .auth-panel {
        padding: 44px 24px 56px;
    }
}

@media screen and (max-width: 520px) {
    .auth-brand {
        min-height: 220px;
    }

    .auth-brand p {
        font-size: 14px;
        line-height: 1.7;
    }

    .auth-panel {
        align-items: flex-start;
        padding-top: 36px;
    }

    .auth-card-header {
        margin-bottom: 26px;
    }

    .auth-card-header h2 {
        font-size: 26px;
    }
}
