:root {
    color-scheme: light;
    --auth-navy-950: #06162c;
    --auth-navy-900: #092442;
    --auth-navy-800: #0e345e;
    --auth-blue-700: #12589b;
    --auth-blue-600: #176bb7;
    --auth-blue-100: #dcecff;
    --auth-orange: #ff5a0a;
    --auth-ink: #142238;
    --auth-muted: #5b6b80;
    --auth-line: #cbd5e1;
    --auth-surface: #ffffff;
    --auth-canvas: #edf3f9;
    --auth-danger: #a61b1b;
    --auth-danger-bg: #fff1f1;
    --auth-focus: #ff6a1a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-link { color: #155eef; font-weight: 600; text-underline-offset: .18em; }
.auth-recovery { margin: 1rem 0 0; text-align: center; }

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

html {
    min-width: 0;
    background: var(--auth-canvas);
}

body.auth-page {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 8% 12%, rgb(23 107 183 / 12%), transparent 30rem),
        linear-gradient(145deg, #f7faff 0%, var(--auth-canvas) 60%, #e7eef7 100%);
}

@supports (min-height: 100dvh) {
    body.auth-page {
        min-height: 100dvh;
    }
}

button,
input {
    font: inherit;
}

.auth-main {
    display: grid;
    min-height: 100vh;
    align-items: center;
    padding:
        max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
}

@supports (min-height: 100dvh) {
    .auth-main {
        min-height: 100dvh;
    }
}

.auth-shell {
    display: grid;
    width: min(68rem, 100%);
    min-width: 0;
    margin: auto;
    overflow: clip;
    border: 1px solid rgb(9 36 66 / 10%);
    border-radius: 1.5rem;
    background: var(--auth-surface);
    box-shadow: 0 1.75rem 4.5rem rgb(6 22 44 / 15%);
}

.auth-identity {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(150deg, var(--auth-navy-800), var(--auth-navy-950) 72%);
    isolation: isolate;
}

.auth-identity::before {
    position: absolute;
    z-index: -1;
    width: 20rem;
    height: 20rem;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 50%;
    content: "";
    inset: auto -8rem -9rem auto;
}

.auth-identity__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(2.5rem, 8vw, 7rem);
    padding: clamp(1.5rem, 5vw, 4.5rem);
}

.auth-logo {
    display: block;
    width: min(21rem, 100%);
    height: auto;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 .75rem 2rem rgb(0 0 0 / 16%);
}

.auth-identity__copy {
    max-width: 27rem;
}

.auth-kicker {
    margin: 0 0 .75rem;
    color: #9ecdf7;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.auth-identity h2 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.auth-identity__copy > p:last-child {
    max-width: 34ch;
    margin: 1rem 0 0;
    color: #d8e8f7;
    font-size: 1rem;
    line-height: 1.65;
}

.auth-geometry,
.auth-geometry span {
    position: absolute;
    pointer-events: none;
}

.auth-geometry {
    inset: 0;
    overflow: hidden;
}

.auth-geometry span:first-child {
    width: 9rem;
    height: 9rem;
    border: 1px solid rgb(158 205 247 / 22%);
    transform: rotate(28deg);
    inset: 10% -4rem auto auto;
}

.auth-geometry span:nth-child(2) {
    width: .55rem;
    height: 5rem;
    border-radius: 99px;
    background: var(--auth-orange);
    transform: rotate(42deg);
    inset: 34% 15% auto auto;
}

.auth-geometry span:last-child {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: rgb(23 107 183 / 25%);
    inset: auto auto 12% 12%;
}

.auth-access {
    display: grid;
    min-width: 0;
    align-items: center;
    background: var(--auth-surface);
}

.auth-access__inner {
    width: min(27rem, 100%);
    margin: auto;
    padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem);
}

.auth-kicker--dark {
    color: var(--auth-blue-700);
}

.auth-access h1 {
    margin: 0;
    color: var(--auth-navy-950);
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.auth-intro {
    margin: .8rem 0 2rem;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-alert {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: .65rem;
    align-items: start;
    margin: 0 0 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid #f0b7b7;
    border-radius: .65rem;
    color: #771313;
    background: var(--auth-danger-bg);
}

.auth-alert__mark {
    display: grid;
    width: 1.5rem;
    height: 1.5rem;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--auth-danger);
    font-size: .85rem;
    font-weight: 800;
}

.auth-alert p {
    margin: .05rem 0 0;
    font-size: .925rem;
    line-height: 1.45;
}

.auth-form {
    display: grid;
    gap: 1.15rem;
}

.auth-field {
    display: grid;
    min-width: 0;
    gap: .45rem;
}

.auth-field label {
    color: var(--auth-navy-900);
    font-size: .9rem;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    min-width: 0;
    min-height: 3.15rem;
    border: 1px solid var(--auth-line);
    border-radius: .65rem;
    padding: .75rem .9rem;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-field input:hover {
    border-color: #8fa2b9;
}

.auth-field input:focus-visible {
    border-color: var(--auth-blue-600);
    outline: 3px solid rgb(23 107 183 / 20%);
    outline-offset: 1px;
}

.auth-field input:-webkit-autofill {
    -webkit-text-fill-color: var(--auth-ink);
    box-shadow: 0 0 0 1000px #f4f9ff inset;
}

.auth-password {
    position: relative;
    min-width: 0;
}

.auth-password input {
    padding-right: 5.8rem;
}

.auth-password__toggle {
    position: absolute;
    min-width: 4.8rem;
    min-height: 2.5rem;
    border: 0;
    border-radius: .45rem;
    padding: .45rem .65rem;
    color: var(--auth-blue-700);
    background: transparent;
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
    inset: 50% .35rem auto auto;
    transform: translateY(-50%);
}

.auth-password__toggle:hover {
    background: var(--auth-blue-100);
}

.auth-password__toggle:focus-visible,
.auth-submit:focus-visible {
    outline: 3px solid var(--auth-focus);
    outline-offset: 3px;
}

.auth-submit {
    display: inline-flex;
    width: 100%;
    min-height: 3.2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .65rem;
    padding: .8rem 1.2rem;
    color: #fff;
    background: var(--auth-blue-700);
    box-shadow: 0 .65rem 1.3rem rgb(18 88 155 / 20%);
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover:not(:disabled) {
    background: var(--auth-navy-800);
    box-shadow: 0 .8rem 1.5rem rgb(18 88 155 / 26%);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.auth-support {
    margin: 1.5rem 0 0;
    color: var(--auth-muted);
    font-size: .8rem;
    line-height: 1.5;
    text-align: center;
}

@media (min-width: 48rem) {
    .auth-shell {
        grid-template-columns: minmax(17rem, .9fr) minmax(26rem, 1.1fr);
    }

    .auth-identity__content {
        min-height: 38rem;
    }
}

@media (max-width: 47.999rem) {
    .auth-main {
        align-items: start;
    }

    .auth-shell {
        width: min(32rem, 100%);
        border-radius: 1.1rem;
    }

    .auth-identity__content {
        gap: 1.4rem;
        padding: 1.5rem;
    }

    .auth-logo {
        width: min(15rem, 82%);
    }

    .auth-identity h2 {
        max-width: none;
        font-size: 1.6rem;
    }

    .auth-identity__copy > p:last-child {
        margin-top: .65rem;
        font-size: .925rem;
    }

    .auth-geometry span:nth-child(2) {
        display: none;
    }

    .auth-access__inner {
        padding: 2rem 1.5rem 1.75rem;
    }
}

@media (max-width: 23rem) {
    .auth-main {
        padding-right: max(.65rem, env(safe-area-inset-right));
        padding-left: max(.65rem, env(safe-area-inset-left));
    }

    .auth-identity__content,
    .auth-access__inner {
        padding-right: 1.1rem;
        padding-left: 1.1rem;
    }

    .auth-password__toggle {
        min-width: 4.4rem;
        padding-inline: .45rem;
    }

    .auth-password input {
        padding-right: 5.2rem;
    }
}

@media (max-height: 42rem) and (min-width: 48rem) {
    .auth-main {
        align-items: start;
    }

    .auth-identity__content {
        min-height: 32rem;
        gap: 2rem;
    }

    .auth-access__inner {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto;
        transition-duration: .01ms;
        animation-duration: .01ms;
        animation-iteration-count: 1;
    }
}
