:root {
    color-scheme: dark;
    --background: #080910;
    --card: #0e0f18;
    --line: #292a35;
    --text: #f1f1f4;
    --muted: #8f909e;
    --soft: #b8bac5;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 43%, #11121b 0, #0a0b12 36%, var(--background) 76%);
    font-family: "DM Sans", Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

.back-link {
    position: absolute;
    z-index: 2;
    top: 20px;
    left: 24px;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 11px;
    padding: 0 20px;
    color: #101117;
    background: linear-gradient(135deg, #e1e2e7, #aeb1bc);
    border: 1px solid #d5d6dd;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.back-link:hover {
    background: #f4f4f7;
    box-shadow: 0 0 20px #d5d7e01c;
    transform: translateY(-1px);
}

.auth-layout {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 76px 20px 80px;
    overflow: hidden;
}

.ambient {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: #c9cbd4;
    filter: blur(160px);
    opacity: .055;
    pointer-events: none;
}

.ambient-one {
    top: 12%;
    left: 18%;
}

.ambient-two {
    right: 12%;
    bottom: 8%;
    opacity: .035;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 448px);
    padding: 40px 42px 29px;
    background: linear-gradient(155deg, #10111b, #0b0c14 72%);
    border: 1px solid #292a36;
    border-radius: 22px;
    box-shadow: 0 32px 100px #0008, inset 0 1px #ffffff07;
}

.brand {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0 auto 32px;
    color: #c8c9d1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.3px;
    text-decoration: none;
}

.brand img {
    width: 29px;
    height: 29px;
    object-fit: contain;
}

.auth-heading {
    margin-bottom: 27px;
    text-align: center;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 11px;
    color: #8d8f9d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.auth-heading h1 {
    margin: 0;
    color: #f4f4f6;
    font-size: clamp(27px, 6vw, 34px);
    font-weight: 700;
    letter-spacing: -1.4px;
    line-height: 1.15;
}

.auth-heading p {
    margin: 10px 0 0;
    color: #9294a1;
    font-size: 13px;
    line-height: 1.55;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: #c6c7cf;
    font-size: 11px;
    font-weight: 600;
}

.email-label {
    margin-top: 17px;
}

.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 17px;
}

.password-hint {
    margin-bottom: 8px;
    color: #777987;
    font-size: 9px;
}

.input-wrap {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    background: #12131c;
    border: 1px solid #292a35;
    border-radius: 10px;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.input-wrap:focus-within {
    background: #151620;
    border-color: #737581;
    box-shadow: 0 0 0 3px #c6c8d20e;
}

.input-icon {
    width: 17px;
    flex: 0 0 17px;
    color: #848693;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.lock-icon {
    font-size: 11px;
}

.input-wrap input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    color: #ededf1;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 12px;
}

.input-wrap input::placeholder {
    color: #666875;
}

.show-password {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #a1a3af;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.show-password:hover {
    color: #f0f0f3;
}

.show-password:focus-visible {
    outline: 2px solid #d3d4dc;
    outline-offset: 2px;
}

.eye-icon {
    width: 18px;
    height: 18px;
}

.eye-icon--visible,
.show-password[aria-pressed="true"] .eye-icon--hidden {
    display: none;
}

.show-password[aria-pressed="true"] .eye-icon--visible {
    display: block;
}

.confirm-field {
    margin-top: 17px;
}

.confirm-field .field-label {
    margin-bottom: 8px;
}

.terms-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 19px 0 18px;
    color: #9294a1;
    cursor: pointer;
    font-size: 10px;
    line-height: 1.5;
}

.terms-row input {
    position: absolute;
    width: 17px;
    height: 17px;
    margin: 0;
    opacity: 0;
}

.custom-checkbox {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    place-items: center;
    background: #14151f;
    border: 1px solid #3b3c48;
    border-radius: 4px;
}

.terms-row input:focus-visible + .custom-checkbox {
    outline: 2px solid #c9cbd4;
    outline-offset: 2px;
}

.terms-row input:checked + .custom-checkbox {
    background: #d1d3dc;
    border-color: #d1d3dc;
}

.terms-row input:checked + .custom-checkbox::after {
    width: 7px;
    height: 4px;
    border-bottom: 2px solid #11121a;
    border-left: 2px solid #11121a;
    content: "";
    transform: rotate(-45deg) translateY(-1px);
}

.terms-row a {
    color: #c5c6ce;
    text-decoration-color: #626471;
    text-underline-offset: 3px;
}

.terms-row a:hover {
    color: #fff;
}

.security-note {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 11px;
    margin: 0 0 18px;
    padding: 10px 12px;
    background: linear-gradient(110deg, #15161f, #11121a);
    border: 1px solid #2b2c37;
    border-radius: 9px;
}

.security-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    background: #20212b;
    color: #c7c9d2;
    border: 1px solid #343540;
    border-radius: 8px;
    font-size: 17px;
}

.security-note > span:nth-child(2) {
    min-width: 0;
}

.security-note b,
.security-note small {
    display: block;
}

.security-note b {
    color: #c9cad2;
    font-size: 10px;
    font-weight: 600;
}

.security-note small {
    margin-top: 4px;
    color: #858794;
    font-size: 9px;
    line-height: 1.45;
}

.security-status {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    margin-left: auto;
    color: #9b9da9;
    background: #1b1c25;
    border: 1px solid #343540;
    border-radius: 50%;
    font-size: 12px;
}

.forgot-link {
    align-self: flex-end;
    margin: 14px 0 18px;
    color: #aeb0bb;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 10px;
}

.forgot-link:hover {
    color: #fff;
}

.submit-button {
    display: flex;
    width: 100%;
    min-height: 51px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 18px;
    color: #11121a;
    background: linear-gradient(115deg, #e0e1e7, #b8bac5);
    border: 1px solid #e2e3e9;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
}

.submit-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 28px #d2d4df21;
    transform: translateY(-1px);
}

.submit-button:focus-visible,
.show-password:focus-visible,
.mode-toggle:focus-visible,
.back-link:focus-visible {
    outline: 2px solid #d3d4dc;
    outline-offset: 3px;
}

.form-message {
    margin: 14px 0 0;
    padding: 11px 12px;
    color: #c7c9d2;
    background: #171821;
    border: 1px solid #30313d;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.55;
}

.form-message.error {
    color: #e6bcbc;
    border-color: #553b42;
}

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 23px;
    padding-top: 19px;
    border-top: 1px solid #242530;
    color: #858794;
    font-size: 11px;
}

.auth-switch a {
    color: #d3d4dc;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    color: #fff;
}

.demo-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 22px 0 0;
    color: #717380;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}

.demo-note > span {
    display: grid;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    place-items: center;
    border: 1px solid #696b77;
    border-radius: 50%;
    font-size: 8px;
}

.auth-footnote {
    position: absolute;
    right: 20px;
    bottom: 22px;
    left: 20px;
    display: flex;
    justify-content: space-between;
    color: #626471;
    font-size: 9px;
}

@media (max-width: 520px) {
    .back-link {
        top: 18px;
        left: 18px;
        padding: 0 14px;
        font-size: 11px;
    }

    .auth-layout {
        align-items: flex-start;
        padding: 62px 14px 80px;
    }

    .auth-card {
        padding: 30px 23px 24px;
        border-radius: 17px;
    }

    .brand {
        margin-bottom: 27px;
    }

    .auth-heading {
        margin-bottom: 23px;
    }

    .input-wrap {
        min-height: 48px;
        padding: 0 12px;
    }

    .input-wrap input {
        height: 46px;
    }

    .terms-row {
        align-items: flex-start;
        line-height: 1.65;
    }

    .custom-checkbox {
        margin-top: 1px;
    }

    .security-note {
        gap: 8px;
        padding: 9px;
    }

    .security-note small {
        font-size: 8px;
    }

    .auth-footnote {
        bottom: 17px;
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* SDonate split-panel account screen */
.auth-layout {
    padding: 42px 24px 70px;
    background:
        radial-gradient(ellipse at 18% 18%, #2460c52b, transparent 38%),
        radial-gradient(ellipse at 82% 86%, #2447a51d, transparent 42%);
}

.ambient-one {
    background: #3478e8;
    opacity: .09;
}

.ambient-two {
    background: #255be0;
    opacity: .07;
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
    width: min(100%, 1200px);
    padding: 0;
    overflow: hidden;
    background: #0c1220;
    border: 1px solid #2a3d60;
    border-radius: 24px;
    box-shadow: 0 32px 100px #0008, 0 0 60px #2252a51c, inset 0 1px #ffffff08;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    min-height: 640px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(32px, 5vw, 64px);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 75% 15%, #4788f235, transparent 38%),
        linear-gradient(145deg, #172c51, #101c34 58%, #10182b);
    border-right: 1px solid #2c4267;
}

.auth-brand-panel::after {
    position: absolute;
    right: -100px;
    bottom: -155px;
    width: 360px;
    height: 360px;
    border: 1px solid #77a6f41a;
    border-radius: 50%;
    box-shadow: 0 0 0 35px #77a6f40a, 0 0 0 75px #77a6f407;
    content: "";
    pointer-events: none;
}

.auth-brand-panel .brand {
    position: relative;
    z-index: 1;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    color: #f3f7ff;
    font-size: 25px;
    letter-spacing: -.8px;
}

.auth-brand-panel .brand img {
    width: 188px;
    height: 74px;
    object-fit: cover;
    filter: drop-shadow(0 13px 28px #478aff55);
}

.auth-hero-art {
    position: relative;
    z-index: 0;
    width: 112%;
    max-width: 640px;
    aspect-ratio: 2 / 1;
    margin: 0 -6%;
    pointer-events: none;
    user-select: none;
    animation: auth-hero-float 7s ease-in-out infinite;
}

.auth-hero-character {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px #087cff44);
}

.auth-hero-logo-shield {
    position: absolute;
    top: 40%;
    right: 5%;
    display: grid;
    width: 25%;
    aspect-ratio: 1.45;
    place-items: center;
    filter: drop-shadow(0 0 8px #168fff) drop-shadow(0 0 18px #3f4fff88);
    transform: rotate(-48deg);
    animation: auth-logo-glow 3.2s ease-in-out infinite;
}

.auth-hero-logo-shield img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes auth-hero-float {
    0%, 100% { transform: translateY(0) rotate(-.4deg); }
    50% { transform: translateY(-10px) rotate(.6deg); }
}

@keyframes auth-logo-glow {
    0%, 100% { filter: drop-shadow(0 0 7px #168fff88) drop-shadow(0 0 15px #3f4fff66); }
    50% { filter: drop-shadow(0 0 12px #45c5ff) drop-shadow(0 0 23px #5b42ff99); }
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 430px;
}

.auth-brand-kicker {
    color: #8db9ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.auth-brand-copy h2 {
    margin: 13px 0 12px;
    color: #f4f7ff;
    font-size: clamp(28px, 3.2vw, 39px);
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.auth-brand-copy p {
    max-width: 390px;
    margin: 0;
    color: #a9bbdc;
    font-size: 14px;
    line-height: 1.8;
}

.auth-brand-caption {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 31px;
    color: #c1d6fa;
    font-size: 11px;
}

.auth-brand-caption::before {
    width: 7px;
    height: 7px;
    background: #59d9a1;
    border-radius: 50%;
    box-shadow: 0 0 13px #59d9a1a0;
    content: "";
}

.auth-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 62px);
    background: linear-gradient(160deg, #0d1422, #0a101c);
}

.auth-main .auth-heading {
    margin: 0 0 24px;
    text-align: left;
}

.auth-main .auth-heading h1 {
    color: #f2f6ff;
    font-size: clamp(27px, 3vw, 34px);
    letter-spacing: -1.2px;
}

.auth-main .auth-heading p {
    color: #96a9c8;
    font-size: 13px;
}

.auth-main .auth-kicker {
    color: #82aaff;
}

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 0 0 29px;
    padding: 5px;
    background: #080e1a;
    border: 1px solid #243654;
    border-radius: 12px;
}

.auth-mode-tab {
    min-height: 42px;
    padding: 0 10px;
    color: #9aacc9;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}

.auth-mode-tab:hover {
    color: #e4edff;
}

.auth-mode-tab.is-active {
    color: #f5f8ff;
    background: linear-gradient(110deg, #1d4ca0, #25498c);
    border-color: #3b66b2;
    box-shadow: 0 5px 16px #163c8055, inset 0 1px #ffffff12;
}

.auth-main .field-label {
    color: #c5d3eb;
    font-size: 12px;
}

.auth-main .email-label,
.auth-main .password-label-row,
.auth-main .confirm-field {
    margin-top: 18px;
}

.auth-main .input-wrap {
    min-height: 50px;
    background: #101b2c;
    border-color: #2c4264;
    border-radius: 10px;
}

.auth-main .input-wrap:focus-within {
    background: #122039;
    border-color: #5b8de1;
    box-shadow: 0 0 0 3px #3874db24;
}

.auth-main .input-wrap input {
    height: 48px;
    color: #edf4ff;
}

.auth-main .input-icon {
    color: #85a6dc;
}

.auth-main .input-wrap input::placeholder {
    color: #6f83a4;
}

.auth-main .show-password {
    color: #9fb6da;
}

.auth-main .show-password:hover {
    color: #fff;
}

.auth-main .terms-row {
    color: #94a7c7;
    font-size: 11px;
}

.auth-main .custom-checkbox {
    background: #101b2c;
    border-color: #3b5276;
}

.auth-main .terms-row input:checked + .custom-checkbox {
    background: #3976e8;
    border-color: #5b94ff;
}

.auth-main .terms-row input:checked + .custom-checkbox::after {
    border-color: #fff;
}

.auth-main .terms-row a {
    color: #9dc3ff;
    text-decoration-color: #476996;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 4px;
}

.auth-main .submit-button {
    width: auto;
    min-width: 140px;
    min-height: 46px;
    padding: 0 19px;
    color: #fff;
    background: linear-gradient(110deg, #2360e8, #397fe9);
    border-color: #5489f3;
    border-radius: 10px;
    box-shadow: 0 8px 23px #2562d948;
}

.auth-main .submit-button:hover {
    box-shadow: 0 11px 28px #3478ee6b;
}

.auth-main .submit-button:disabled {
    opacity: .65;
    cursor: wait;
}

.auth-main .forgot-link {
    margin: 0;
    color: #9fc2ff;
    font-size: 12px;
    font-weight: 650;
}

.auth-main .forgot-link:hover {
    color: #d3e4ff;
}

.auth-main .form-message {
    color: #bed4f7;
    background: #15243b;
    border-color: #314f79;
}

.auth-main .form-message.error {
    color: #ffc0ca;
    background: #311d2a;
    border-color: #714153;
}

.auth-main .auth-switch + .auth-heading {
    margin-top: 0;
}

.auth-main .demo-note {
    justify-content: center;
    margin-top: 23px;
    color: #7f92b1;
    text-align: left;
}

.auth-main .demo-note > span {
    color: #90b8f5;
    border-color: #46658f;
}

.auth-footnote {
    right: 24px;
    bottom: 20px;
    left: 24px;
    justify-content: center;
    gap: 9px;
    color: #7185a6;
    font-size: 10px;
}

.auth-footnote span:first-child {
    color: #afc9f3;
    font-weight: 700;
}

@media (max-width: 850px) {
    .auth-card {
        grid-template-columns: minmax(0, .78fr) minmax(0, 1fr);
    }

    .auth-brand-panel {
        min-height: 600px;
        padding: 36px;
    }

    .auth-main {
        padding: 36px;
    }
}

@media (max-width: 680px) {
    .auth-layout {
        align-items: flex-start;
        padding: 72px 14px 65px;
    }

    .auth-card {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    .auth-brand-panel {
        display: grid;
        min-height: 210px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-items: start;
        justify-content: start;
        gap: 10px;
        padding: 22px;
        border-right: 0;
        border-bottom: 1px solid #2c4267;
    }

    .auth-brand-panel .brand {
        align-items: flex-start;
        margin: 0;
    }

    .auth-brand-panel .brand img {
        width: 145px;
        height: 60px;
    }

    .auth-hero-art {
        position: absolute;
        top: 28px;
        right: 2%;
        width: 55%;
        max-width: 245px;
        aspect-ratio: 2 / 1;
        margin: 0;
        opacity: .86;
    }

    .auth-hero-logo-shield {
        width: 25%;
    }

    .auth-brand-copy {
        max-width: 56%;
        padding: 0;
        align-self: end;
    }

    .auth-brand-kicker {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .auth-brand-copy h2 {
        margin: 5px 0;
        font-size: 18px;
        letter-spacing: -.5px;
    }

    .auth-brand-copy p,
    .auth-brand-caption {
        display: none;
    }

    .auth-main {
        padding: 26px 22px;
    }

    .auth-switch {
        margin-bottom: 23px;
    }
}

@media (max-width: 380px) {
    .auth-brand-panel {
        min-height: 195px;
        padding: 18px;
    }

    .auth-brand-panel .brand img {
        width: 132px;
        height: 54px;
    }

    .auth-hero-art {
        top: 25px;
        right: 3%;
        width: 50%;
        max-width: 190px;
        opacity: .72;
    }

    .auth-brand-copy h2 {
        font-size: 16px;
        text-align: left;
    }

    .auth-brand-copy {
        max-width: 60%;
        text-align: left;
    }

    .auth-main {
        padding: 23px 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero-art,
    .auth-hero-logo-shield {
        animation: none;
    }

    .auth-mode-tab,
    .auth-main .submit-button {
        transition: none;
    }
}
