:root {
    --auth-ink: #172231;
    --auth-navy: #091321;
    --auth-blue: #087bd7;
    --auth-muted: #637184;
    --auth-line: #dce3eb;
    --auth-paper: #f3f6fa;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    background: var(--auth-paper);
    color: var(--auth-ink);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1.12fr);
}

.auth-aside {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 34px clamp(30px, 5vw, 74px) 28px;
    background: linear-gradient(145deg, #080f1b 2%, #11233d 58%, #0b4b8b 100%);
    color: #fff;
}

.auth-brand,
.auth-mobile-brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.auth-brand img,
.auth-mobile-brand img {
    width: 42px;
    height: 42px;
    border: 1px solid rgb(255 255 255 / 60%);
    border-radius: 50%;
    background: var(--auth-navy);
    object-fit: cover;
}

.auth-brand small,
.auth-mobile-brand small {
    display: block;
    margin-top: 4px;
    color: rgb(255 255 255 / 65%);
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
}

.auth-aside-copy {
    position: relative;
    z-index: 1;
    max-width: 450px;
    margin: auto 0 20px;
}

.auth-kicker {
    margin: 0 0 16px;
    color: #c2d3e7;
    font-size: 10px;
    font-weight: 700;
}

.auth-aside-copy h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 43px;
    font-weight: 600;
    line-height: 1.15;
}

.auth-aside-copy h1 em {
    color: #9ecbff;
    font-family: "DM Serif Display", Georgia, serif;
    font-weight: 400;
    font-style: normal;
}

.auth-aside-copy > p:last-child {
    max-width: 360px;
    margin: 0;
    color: rgb(255 255 255 / 76%);
    font-size: 14px;
    line-height: 1.8;
}

.auth-wordmark {
    display: block;
    width: min(100%, 390px);
    max-height: 290px;
    margin: 6px auto 22px;
    object-fit: contain;
}

.auth-aside-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgb(255 255 255 / 62%);
    font-size: 10px;
}

.auth-aside-footer a {
    color: #fff;
    text-decoration: none;
}

.auth-main {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(28px, 6vw, 92px);
    background: #f7f9fc;
}

.auth-content {
    width: min(100%, 440px);
}

.auth-content-register {
    width: min(100%, 640px);
}

.auth-mobile-brand {
    display: none;
}

.auth-kicker-blue {
    margin-bottom: 10px;
    color: var(--auth-blue);
}

.auth-main h2 {
    margin: 0 0 7px;
    color: var(--auth-ink);
    font-size: 29px;
    font-weight: 600;
    line-height: 1.25;
}

.auth-intro {
    margin: 0 0 27px;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    border: 1px solid var(--auth-line);
    background: #edf1f6;
}

.auth-role-tab {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: #526174;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.auth-role-tab.is-active {
    background: #fff;
    box-shadow: 0 1px 4px rgb(22 39 63 / 12%);
    color: var(--auth-blue);
}

.auth-role-tab:focus-visible,
.password-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-form a:focus-visible {
    outline: 3px solid rgb(8 123 215 / 32%);
    outline-offset: 2px;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    color: #26364a;
    font-size: 12px;
    font-weight: 600;
}

.auth-field {
    min-width: 0;
}

.auth-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 3px;
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 13px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-input::placeholder {
    color: #8a98a9;
}

.auth-input:focus {
    border-color: var(--auth-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgb(8 123 215 / 12%);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    display: grid;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.auth-label-row {
    margin-bottom: -15px;
}

.auth-check {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    color: #526174 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

.auth-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--auth-blue);
}

.auth-submit {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 3px;
    padding: 0 17px;
    border: 0;
    border-radius: 3px;
    background: var(--auth-blue);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 150ms ease;
}

.auth-submit:hover {
    background: #0668b7;
}

.auth-submit:disabled {
    background: #91a7bc;
    cursor: not-allowed;
}

.auth-switch-note {
    margin: 3px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
    text-align: center;
}

.auth-switch-note a,
.auth-message a {
    color: var(--auth-blue);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch-note a:hover,
.auth-message a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 11px 12px;
    border: 1px solid #c8d9eb;
    background: #eaf3fc;
    color: #214b70;
    font-size: 12px;
}

.auth-message-error {
    border-color: #e5c7c7;
    background: #fff0f0;
    color: #8a2929;
}

.auth-message-success {
    border-color: #b9d8cc;
    background: #edf8f2;
    color: #245b43;
}

@media (max-width: 850px) {
    .auth-shell {
        grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
    }

    .auth-aside {
        padding-right: 28px;
        padding-left: 28px;
    }

    .auth-aside-copy h1 {
        font-size: 35px;
    }

    .auth-main {
        padding-right: 34px;
        padding-left: 34px;
    }
}

@media (max-width: 680px) {
    .auth-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-aside {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        align-items: flex-start;
        padding: 26px 20px 40px;
    }

    .auth-content,
    .auth-content-register {
        width: min(100%, 520px);
        margin: 0 auto;
    }

    .auth-mobile-brand {
        display: inline-flex;
        margin-bottom: 38px;
        color: var(--auth-ink);
    }

    .auth-mobile-brand img {
        border-color: #bbc8d6;
    }

    .auth-mobile-brand small {
        color: var(--auth-muted);
    }

    .auth-field-grid {
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .auth-main {
        padding-right: 17px;
        padding-left: 17px;
    }

    .auth-field-grid {
        grid-template-columns: 1fr;
    }

    .auth-main h2 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}