:root {
    color-scheme: light;
    --auth-ink: #19313b;
    --auth-muted: #687b83;
    --auth-border: #dce5e7;
    --auth-teal: #167f78;
    --auth-teal-dark: #116861;
    --auth-focus: rgba(22, 127, 120, .18);
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    margin: 0;
    background: #f5f8f8;
    color: var(--auth-ink);
    font-family: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(340px, .92fr) minmax(500px, 1.08fr);
    min-height: 100vh;
}

.auth-aside {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 38px clamp(36px, 5vw, 76px) 32px;
    background:
        linear-gradient(145deg, rgba(10, 52, 61, .94), rgba(15, 99, 91, .88)),
        url("../main/img/loginimage.jpg") center 58% / cover no-repeat,
        #123f4a;
    color: #fff;
}

.auth-aside::before,
.auth-aside::after {
    position: absolute;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.auth-aside::before {
    top: 24%;
    right: -210px;
    width: 510px;
    height: 510px;
    box-shadow: 0 0 0 52px rgba(255, 255, 255, .035);
}

.auth-aside::after {
    right: 12%;
    bottom: -180px;
    width: 340px;
    height: 340px;
    border-color: rgba(255, 255, 255, .08);
}

.auth-aside__brand,
.auth-aside__message,
.auth-aside__footer {
    position: relative;
    z-index: 1;
}

.auth-aside__brand,
.auth-brand-mobile {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    text-decoration: none;
}

.auth-aside__brand img {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
    padding: 4px;
}

.auth-aside__message {
    max-width: 550px;
    padding: 60px 0;
}

.auth-aside__eyebrow {
    display: inline-block;
    margin-bottom: 19px;
    color: #a7e1d8;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.6;
    text-transform: uppercase;
}

.auth-aside__message h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 4.1vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.auth-aside__message p {
    max-width: 440px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 1rem;
    line-height: 1.75;
}

.auth-aside__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
}

.auth-aside__footer-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.auth-main {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 50px clamp(30px, 6vw, 96px) 26px;
    background:
        radial-gradient(ellipse at 90% 8%, rgba(35, 155, 143, .08), transparent 34%),
        #f7f9f9;
}

.auth-main__inner {
    width: 100%;
    max-width: 440px;
    margin-block: auto;
}

.auth-main__inner--wide {
    max-width: 520px;
}

.auth-content--wide {
    max-width: 520px;
}

.auth-brand-mobile {
    display: none;
    margin-bottom: 30px;
    color: var(--auth-ink);
}

.auth-brand-mobile img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.auth-heading {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(1.8rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1.2;
}

.auth-description {
    margin: 10px 0 28px;
    color: var(--auth-muted);
    font-size: .96rem;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-form--register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.auth-field {
    min-width: 0;
}

.auth-field--full {
    grid-column: 1 / -1;
}

.auth-label {
    display: block;
    margin-bottom: 7px;
    color: #2c414a;
    font-size: .84rem;
    font-weight: 650;
}

.auth-input,
.auth-select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
    background-color: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: .93rem;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-input::placeholder {
    color: #98a7ab;
}

.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 68px;
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    padding: 5px 3px;
    border: 0;
    background: transparent;
    color: var(--auth-teal-dark);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
}

.auth-password__toggle:hover {
    color: #0c554f;
    text-decoration: underline;
}

.auth-password__toggle:focus-visible {
    border-radius: 3px;
    outline: 3px solid var(--auth-focus);
    outline-offset: 2px;
}

.auth-input:focus,
.auth-select:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px var(--auth-focus);
}

.auth-input.is-invalid,
.auth-select.is-invalid {
    border-color: #c74040;
}

.auth-error {
    display: block;
    margin-top: 6px;
    color: #b52e35;
    font-size: .8rem;
    line-height: 1.45;
}

.auth-hint {
    display: block;
    margin-top: 6px;
    color: var(--auth-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.auth-form__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -3px;
    color: var(--auth-muted);
    font-size: .84rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-teal);
}

.auth-link {
    color: var(--auth-teal-dark);
    font-weight: 650;
    text-decoration: none;
}

.auth-link:hover {
    color: #0c554f;
    text-decoration: underline;
}

.auth-button {
    display: inline-flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--auth-teal);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .94rem;
    font-weight: 700;
    text-align: center;
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
    background: var(--auth-teal-dark);
    box-shadow: 0 8px 18px rgba(17, 104, 97, .18);
}

.auth-button--secondary {
    border: 1px solid var(--auth-border);
    background: #fff;
    color: var(--auth-teal-dark);
    text-decoration: none;
}

.auth-button--secondary:hover {
    border-color: #b7d5d1;
    background: #f0f8f6;
    color: #0c554f;
    box-shadow: none;
}

.auth-home__eyebrow {
    margin-bottom: 15px;
}

.auth-home__heading {
    max-width: 470px;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.auth-home__description {
    max-width: 490px;
    margin-top: 16px;
    margin-bottom: 30px;
    font-size: 1rem;
}

.auth-home__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-home__button {
    width: auto;
    min-width: 190px;
    text-decoration: none;
}

.auth-home__features {
    display: grid;
    gap: 14px;
    margin-top: 38px;
    padding-top: 27px;
    border-top: 1px solid var(--auth-border);
}

.auth-home__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #526971;
    font-size: .88rem;
}

.auth-home__feature-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    background: #e8f4f2;
    color: var(--auth-teal-dark);
    font-size: .68rem;
    font-weight: 750;
}

.auth-button:focus-visible,
.auth-link:focus-visible,
.auth-checkbox input:focus-visible {
    outline: 3px solid var(--auth-focus);
    outline-offset: 3px;
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--auth-muted);
    font-size: .87rem;
    text-align: center;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: .85rem;
    text-decoration: none;
}

.auth-back:hover {
    color: var(--auth-teal-dark);
}

.auth-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .86rem;
    line-height: 1.5;
}

.auth-alert--success {
    border-color: #c3e6dc;
    background: #ecf8f3;
    color: #17684f;
}

.auth-alert--error {
    border-color: #f0c9cb;
    background: #fff1f1;
    color: #9c292f;
}

.auth-main__footer {
    margin-top: 36px;
    color: #8a999d;
    font-size: .76rem;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr);
    }

    .auth-aside {
        padding-right: 34px;
        padding-left: 34px;
    }

    .auth-main {
        padding-right: 36px;
        padding-left: 36px;
    }
}

@media (max-width: 700px) {
    .auth-layout {
        display: block;
        min-height: 100vh;
    }

    .auth-aside {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        padding: 30px 22px 22px;
    }

    .auth-main__inner {
        max-width: 480px;
    }

    .auth-brand-mobile {
        display: inline-flex;
    }

    .auth-main__footer {
        margin-top: 28px;
    }

    .auth-home__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-home__button {
        width: 100%;
    }

    .auth-home__features {
        margin-top: 28px;
    }
}

@media (max-width: 480px) {
    .auth-form--register {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .auth-field--full {
        grid-column: auto;
    }

    .auth-main {
        padding-right: 18px;
        padding-left: 18px;
    }

    .auth-form__meta {
        font-size: .8rem;
    }
}
