/* BugPk user entry pages: calm, focused, and responsive. */
:root {
    --auth-canvas: #edf3f6;
    --auth-surface: rgba(255, 255, 255, .94);
    --auth-ink: #132b3a;
    --auth-muted: #6b808d;
    --auth-line: #d8e4ea;
    --auth-primary: #176ff2;
    --auth-primary-dark: #0d5fd8;
    --auth-accent: #ff6a4d;
    --auth-shadow: 0 28px 78px rgba(14, 46, 65, .16);
}

body.page-auth {
    min-width: 320px;
    min-height: 100dvh;
    color: var(--auth-ink);
    background:
        linear-gradient(rgba(23, 111, 242, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 111, 242, .025) 1px, transparent 1px),
        radial-gradient(circle at 12% 0, rgba(23, 111, 242, .14), transparent 28rem),
        radial-gradient(circle at 94% 100%, rgba(24, 169, 153, .12), transparent 30rem),
        var(--auth-canvas);
    background-size: 32px 32px, 32px 32px, auto, auto, auto;
    font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body.page-auth #page-container,
body.page-auth #main-container,
body.page-auth .bg-body-dark {
    min-height: 100dvh;
    background: transparent !important;
}

body.page-auth .bg-body-dark {
    position: relative;
    overflow: hidden;
}

body.page-auth .auth-theme-toggle {
    position: fixed;
    z-index: 30;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .45rem .72rem;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 24px rgba(14, 46, 65, .08);
    backdrop-filter: blur(14px);
    font-size: .75rem;
    font-weight: 720;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

body.page-auth .auth-theme-toggle:hover {
    border-color: rgba(23, 111, 242, .38);
    background: rgba(255, 255, 255, .94);
    transform: translateY(-1px);
}

body.page-auth .auth-theme-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(23, 111, 242, .12);
}

body.page-auth .bg-body-dark::before {
    content: "";
    position: absolute;
    top: 50%;
    left: max(3vw, calc(50% - 680px));
    width: 280px;
    height: 280px;
    border: 1px solid rgba(23, 111, 242, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(23, 111, 242, .035), 0 0 0 82px rgba(23, 111, 242, .025);
    transform: translateY(-50%);
    pointer-events: none;
}

body.page-auth .bg-body-dark::after {
    content: "API WORKSPACE\A 简洁 · 安全 · 可控";
    position: absolute;
    top: 50%;
    right: max(4vw, calc(50% - 680px));
    color: rgba(19, 71, 103, .28);
    font-size: .7rem;
    font-weight: 780;
    letter-spacing: .16em;
    line-height: 2;
    white-space: pre;
    transform: translateY(-50%) rotate(90deg);
    pointer-events: none;
}

body.page-auth .row.mx-0 {
    min-height: 100dvh;
    align-items: center;
}

body.page-auth .hero-static {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 1.5rem;
}

body.page-auth .content.content-full {
    overflow: visible !important;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

body.page-auth .content.content-full > .py-4 {
    padding: 0 0 1.4rem !important;
}

body.page-auth .content.content-full > .py-4 > a {
    display: inline-flex;
    align-items: center;
    gap: .58rem;
    color: var(--auth-ink) !important;
    font-size: 1.04rem;
    letter-spacing: -.02em;
}

body.page-auth .content.content-full > .py-4 > a i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--auth-primary), #5a5df5);
    box-shadow: 0 8px 18px rgba(23, 111, 242, .22);
}

body.page-auth .content.content-full > .py-4 > a .text-body-color,
body.page-auth .content.content-full > .py-4 > a > span:last-child {
    color: var(--auth-ink) !important;
}

body.page-auth .content.content-full h1 {
    margin-top: 1.25rem !important;
    margin-bottom: .4rem !important;
    color: var(--auth-ink);
    font-size: clamp(1.65rem, 4vw, 2.12rem);
    font-weight: 820;
    letter-spacing: -.055em;
}

body.page-auth .content.content-full h2 {
    color: var(--auth-muted) !important;
    font-size: .85rem;
}

body.page-auth .block.block-themed {
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 20px;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(18px);
}

body.page-auth .block.block-themed .block-header {
    min-height: 62px;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid var(--auth-line);
    background: linear-gradient(90deg, rgba(23, 111, 242, .09), rgba(24, 169, 153, .05)) !important;
}

body.page-auth .block.block-themed .block-header::before {
    content: "";
    width: 4px;
    height: 22px;
    margin-right: .7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--auth-primary), var(--auth-accent));
}

body.page-auth .block.block-themed .block-title {
    color: var(--auth-ink);
    font-size: .9rem;
    font-weight: 780;
}

body.page-auth .block.block-themed .block-content {
    padding: 1.35rem;
}

body.page-auth .form-floating {
    margin-bottom: 1rem !important;
}

body.page-auth .form-floating > .form-control {
    min-height: 52px;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: rgba(250, 252, 253, .94);
}

body.page-auth .form-floating > .form-control:hover {
    border-color: #bbcdd7;
}

body.page-auth .form-floating > .form-control:focus {
    border-color: rgba(23, 111, 242, .55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(23, 111, 242, .1);
}

body.page-auth .form-floating > label {
    color: #718693;
}

body.page-auth .form-check-label,
body.page-auth .block-content small,
body.page-auth .block-content .form-text {
    color: var(--auth-muted);
}

body.page-auth .btn-alt-primary,
body.page-auth .btn-primary {
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, #267cf2, var(--auth-primary-dark));
    box-shadow: 0 9px 22px rgba(23, 111, 242, .2);
    font-weight: 740;
}

body.page-auth .btn-alt-primary:hover,
body.page-auth .btn-primary:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #176ff2, #0759ce);
    box-shadow: 0 12px 27px rgba(23, 111, 242, .27);
    transform: translateY(-1px);
}

body.page-auth #sendCode,
body.page-auth #sendCodeBtn {
    width: 100%;
    min-height: 42px;
    margin-bottom: .25rem;
}

body.page-auth .validation-message {
    margin: -.55rem 0 .7rem;
    color: #c8495b !important;
    font-size: .73rem;
}

body.page-auth .content.content-full > .text-center.push {
    margin: 1rem 0 0 !important;
    color: var(--auth-muted);
}

body.page-auth .content.content-full > .text-center.push a {
    color: var(--auth-primary);
    font-weight: 740;
}

body.page-auth .content.content-full > .text-center.push a:hover {
    color: var(--auth-primary-dark);
}

@media (max-width: 767.98px) {
    body.page-auth {
        background-size: 24px 24px, 24px 24px, auto, auto, auto;
    }

    body.page-auth .bg-body-dark::before,
    body.page-auth .bg-body-dark::after {
        display: none;
    }

    body.page-auth .row.mx-0 {
        align-items: flex-start;
    }

    body.page-auth .hero-static {
        width: 100%;
        padding: max(4rem, calc(env(safe-area-inset-top) + 3.25rem)) max(.75rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
    }

    body.page-auth .auth-theme-toggle {
        top: max(.75rem, env(safe-area-inset-top));
        right: max(.75rem, env(safe-area-inset-right));
    }

    body.page-auth .content.content-full {
        width: 100%;
    }

    body.page-auth .content.content-full > .py-4 {
        padding-top: .65rem !important;
        padding-bottom: 1.05rem !important;
    }

    body.page-auth .content.content-full h1 {
        font-size: 1.7rem;
    }

    body.page-auth .block.block-themed {
        border-radius: 16px;
    }

    body.page-auth .block.block-themed .block-content {
        padding: 1rem;
    }

    body.page-auth .block.block-themed .block-header {
        min-height: 56px;
        padding: .85rem 1rem;
    }

    body.page-auth .row .col-sm-6 {
        width: 100%;
    }

    body.page-auth .row .col-sm-6.text-sm-end {
        margin-top: .2rem;
        text-align: left !important;
    }

    body.page-auth #submitBtn,
    body.page-auth #register,
    body.page-auth #sendCodeBtn,
    body.page-auth #sendCode {
        width: 100%;
    }
}

html.theme-dark body.page-auth,
body.theme-dark.page-auth {
    --auth-canvas: #0d171e;
    --auth-surface: rgba(18, 32, 42, .96);
    --auth-ink: #e7f0f4;
    --auth-muted: #95aab5;
    --auth-line: #2d414d;
    color-scheme: dark;
    background-color: var(--auth-canvas);
    background-image:
        linear-gradient(rgba(102, 151, 190, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 151, 190, .025) 1px, transparent 1px),
        radial-gradient(circle at 12% 0, rgba(23, 111, 242, .16), transparent 28rem),
        radial-gradient(circle at 94% 100%, rgba(24, 169, 153, .08), transparent 30rem),
        var(--auth-canvas);
}

html.theme-dark body.page-auth .auth-theme-toggle,
body.theme-dark.page-auth .auth-theme-toggle {
    color: var(--auth-ink);
    border-color: var(--auth-line);
    background: rgba(18, 32, 42, .82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}

html.theme-dark body.page-auth .auth-theme-toggle:hover,
body.theme-dark.page-auth .auth-theme-toggle:hover {
    border-color: #526a78;
    background: rgba(24, 40, 51, .96);
}

html.theme-dark body.page-auth .content.content-full > .py-4 > a,
html.theme-dark body.page-auth .content.content-full h1,
html.theme-dark body.page-auth .block.block-themed .block-title,
body.theme-dark.page-auth .content.content-full > .py-4 > a,
body.theme-dark.page-auth .content.content-full h1,
body.theme-dark.page-auth .block.block-themed .block-title {
    color: var(--auth-ink) !important;
}

html.theme-dark body.page-auth .content.content-full > .py-4 > a .text-body-color,
html.theme-dark body.page-auth .content.content-full > .py-4 > a > span:last-child,
body.theme-dark.page-auth .content.content-full > .py-4 > a .text-body-color,
body.theme-dark.page-auth .content.content-full > .py-4 > a > span:last-child {
    color: var(--auth-ink) !important;
}

html.theme-dark body.page-auth .block.block-themed,
body.theme-dark.page-auth .block.block-themed {
    border-color: var(--auth-line);
    background: var(--auth-surface);
    box-shadow: 0 28px 78px rgba(0, 0, 0, .3);
}

html.theme-dark body.page-auth .block.block-themed .block-header,
body.theme-dark.page-auth .block.block-themed .block-header {
    border-color: var(--auth-line);
    background: linear-gradient(90deg, rgba(23, 111, 242, .18), rgba(24, 169, 153, .08)) !important;
}

html.theme-dark body.page-auth .form-floating > .form-control,
body.theme-dark.page-auth .form-floating > .form-control {
    color: var(--auth-ink);
    border-color: #304753;
    background: #101d25;
}

html.theme-dark body.page-auth .form-floating > .form-control:hover,
body.theme-dark.page-auth .form-floating > .form-control:hover {
    border-color: #42606f;
}

html.theme-dark body.page-auth .form-floating > .form-control:focus,
body.theme-dark.page-auth .form-floating > .form-control:focus {
    color: var(--auth-ink);
    border-color: rgba(128, 144, 255, .7);
    background: #13232d;
    box-shadow: 0 0 0 4px rgba(128, 144, 255, .12);
}

html.theme-dark body.page-auth .form-floating > label,
body.theme-dark.page-auth .form-floating > label {
    color: #91a7b2;
}

html.theme-dark body.page-auth .form-control:-webkit-autofill,
html.theme-dark body.page-auth .form-control:-webkit-autofill:hover,
html.theme-dark body.page-auth .form-control:-webkit-autofill:focus,
body.theme-dark.page-auth .form-control:-webkit-autofill,
body.theme-dark.page-auth .form-control:-webkit-autofill:hover,
body.theme-dark.page-auth .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-ink);
    box-shadow: 0 0 0 1000px #101d25 inset;
    caret-color: var(--auth-ink);
}

html.theme-dark body.page-auth .form-check-input,
body.theme-dark.page-auth .form-check-input {
    border-color: #42606f;
    background-color: #101d25;
}

html.theme-dark body.page-auth .form-check-input:checked,
body.theme-dark.page-auth .form-check-input:checked {
    border-color: var(--auth-primary);
    background-color: var(--auth-primary);
}

@media (prefers-color-scheme: dark) {
    html:not(.theme-light):not(.theme-dark) body.page-auth {
        --auth-canvas: #0d171e;
        --auth-surface: rgba(18, 32, 42, .96);
        --auth-ink: #e7f0f4;
        --auth-muted: #95aab5;
        --auth-line: #2d414d;
        background-color: var(--auth-canvas);
        background-image:
            linear-gradient(rgba(102, 151, 190, .025) 1px, transparent 1px),
            linear-gradient(90deg, rgba(102, 151, 190, .025) 1px, transparent 1px),
            radial-gradient(circle at 12% 0, rgba(23, 111, 242, .16), transparent 28rem),
            var(--auth-canvas);
    }

    html:not(.theme-light):not(.theme-dark) body.page-auth .content.content-full > .py-4 > a,
    html:not(.theme-light):not(.theme-dark) body.page-auth .content.content-full h1,
    html:not(.theme-light):not(.theme-dark) body.page-auth .block.block-themed .block-title {
        color: var(--auth-ink) !important;
    }

    html:not(.theme-light):not(.theme-dark) body.page-auth .content.content-full > .py-4 > a .text-body-color,
    html:not(.theme-light):not(.theme-dark) body.page-auth .content.content-full > .py-4 > a > span:last-child {
        color: var(--auth-ink) !important;
    }

    html:not(.theme-light):not(.theme-dark) body.page-auth .block.block-themed .block-header {
        background: linear-gradient(90deg, rgba(23, 111, 242, .18), rgba(24, 169, 153, .08)) !important;
    }

    html:not(.theme-light):not(.theme-dark) body.page-auth .form-floating > .form-control {
        color: var(--auth-ink);
        border-color: #304753;
        background: #101d25;
    }

    html:not(.theme-light):not(.theme-dark) body.page-auth .form-floating > label {
        color: #91a7b2;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-auth .btn-alt-primary,
    body.page-auth .btn-primary {
        transition: none !important;
        transform: none !important;
    }
}
