.auth-layout {
    background: #f4f5f8;
    color: #25212a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

.auth-shell {
    --auth-accent: #6f42c1;
    --auth-accent-dark: #59359b;
    --auth-sidebar: #2d1f3b;
    --auth-muted: #6c757d;
    align-items: center;
    background:
        radial-gradient(circle at 10% 15%, rgba(111, 66, 193, .09), transparent 26%),
        radial-gradient(circle at 92% 82%, rgba(22, 119, 165, .07), transparent 24%),
        #f4f5f8;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(1.25rem, 4vw, 3.5rem);
    position: relative;
}

.auth-shell__glow {
    border: 1px solid rgba(111, 66, 193, .1);
    border-radius: 50%;
    pointer-events: none;
    position: absolute;
}

.auth-shell__glow--one {
    height: 300px;
    left: -130px;
    top: -120px;
    width: 300px;
}

.auth-shell__glow--two {
    bottom: -180px;
    height: 420px;
    right: -140px;
    width: 420px;
}

.auth-card {
    background: #fff;
    border: 1px solid rgba(33, 37, 41, .08);
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(31, 25, 39, .15);
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
    min-height: min(710px, calc(100vh - 5rem));
    overflow: hidden;
    position: relative;
    width: min(1120px, 100%);
    z-index: 1;
}

.auth-brand {
    background:
        radial-gradient(circle at 85% 12%, rgba(166, 115, 230, .25), transparent 28%),
        linear-gradient(145deg, #30203f 0%, #261832 55%, #21152c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.25rem);
    position: relative;
}

.auth-brand::after {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    height: 340px;
    position: absolute;
    right: -170px;
    top: 70px;
    width: 340px;
}

.auth-brand__logo {
    align-items: center;
    display: flex;
    gap: .85rem;
    position: relative;
    z-index: 2;
}

.auth-brand__logo-mark {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    color: #dbc7f5;
    display: inline-flex;
    flex: 0 0 44px;
    font-size: 1.05rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.auth-brand__logo strong,
.auth-brand__logo small {
    display: block;
}

.auth-brand__logo strong {
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: .01em;
}

.auth-brand__logo small {
    color: rgba(255, 255, 255, .58);
    font-size: .68rem;
    letter-spacing: .075em;
    margin-top: .1rem;
    text-transform: uppercase;
}

.auth-brand__content {
    margin: auto 0;
    max-width: 470px;
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

.auth-brand__eyebrow,
.auth-form-header__eyebrow {
    display: block;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.auth-brand__eyebrow {
    color: #c7a9ec;
    margin-bottom: .85rem;
}

.auth-brand__content h2 {
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.08;
    margin: 0;
    max-width: 440px;
}

.auth-brand__content > p {
    color: rgba(255, 255, 255, .68);
    font-size: .98rem;
    line-height: 1.65;
    margin: 1.25rem 0 0;
    max-width: 430px;
}

.auth-brand__features {
    display: grid;
    gap: .8rem;
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
}

.auth-brand__features li {
    align-items: center;
    color: rgba(255, 255, 255, .84);
    display: flex;
    font-size: .86rem;
    gap: .7rem;
}

.auth-brand__features i {
    align-items: center;
    background: rgba(111, 66, 193, .42);
    border-radius: 50%;
    color: #e8d9fa;
    display: inline-flex;
    flex: 0 0 25px;
    font-size: .62rem;
    height: 25px;
    justify-content: center;
    width: 25px;
}

.auth-brand__footer {
    align-items: center;
    color: rgba(255, 255, 255, .52);
    display: flex;
    font-size: .72rem;
    gap: .5rem;
    margin: 0;
    position: relative;
    z-index: 2;
}

.auth-brand__footer i {
    color: #b993e7;
}

.auth-brand__skyline {
    align-items: flex-end;
    bottom: -3px;
    display: flex;
    gap: 8px;
    opacity: .055;
    pointer-events: none;
    position: absolute;
    right: 8%;
}

.auth-brand__skyline span {
    background: #fff;
    border-radius: 4px 4px 0 0;
    display: block;
    width: 42px;
}

.auth-brand__skyline span:nth-child(1) {
    height: 90px;
}

.auth-brand__skyline span:nth-child(2) {
    height: 145px;
}

.auth-brand__skyline span:nth-child(3) {
    height: 110px;
}

.auth-brand__skyline span:nth-child(4) {
    height: 190px;
}

.auth-brand__skyline span:nth-child(5) {
    height: 130px;
}

.auth-form-panel {
    align-items: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(111, 66, 193, .055), transparent 29%),
        #fff;
    display: flex;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.auth-form-wrap {
    max-width: 410px;
    width: 100%;
}

.auth-mobile-brand {
    align-items: center;
    color: var(--auth-sidebar);
    display: none;
    gap: .65rem;
    margin-bottom: 2rem;
}

.auth-mobile-brand span {
    align-items: center;
    background: #eee7f9;
    border-radius: 10px;
    color: var(--auth-accent);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.auth-form-header__eyebrow {
    color: var(--auth-accent);
    margin-bottom: .65rem;
}

.auth-form-header h1 {
    color: #211b27;
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.1;
    margin: 0;
}

.auth-form-header p {
    color: var(--auth-muted);
    font-size: .92rem;
    margin: .65rem 0 0;
}

.auth-form {
    margin-top: 2rem;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-field.has-error > label,
.auth-field.has-error .auth-field__label-row label {
    color: #8e2f3a;
}

.auth-field > label,
.auth-field__label-row label {
    color: #39323f;
    font-size: .8rem;
    font-weight: 750;
    margin: 0 0 .45rem;
}

.auth-field__label-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.auth-field__label-row a {
    color: var(--auth-accent);
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: .45rem;
    text-decoration: none;
}

.auth-field__label-row a:hover {
    color: var(--auth-accent-dark);
    text-decoration: underline;
}

.auth-input {
    align-items: center;
    background: #fff;
    border: 1px solid #d8dce1;
    border-radius: 12px;
    display: flex;
    min-height: 50px;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input:focus-within {
    border-color: rgba(111, 66, 193, .68);
    box-shadow: 0 0 0 4px rgba(111, 66, 193, .1);
}

.auth-field.has-error .auth-input {
    background: #fffafb;
    border-color: #df8791;
    box-shadow: 0 0 0 3px rgba(190, 65, 80, .08);
}

.auth-field.has-error .auth-input:focus-within {
    border-color: #c34b59;
    box-shadow: 0 0 0 4px rgba(190, 65, 80, .11);
}

.auth-field.has-error .auth-input__icon {
    color: #b6404e;
}

.auth-input__icon {
    color: #958b9e;
    display: inline-flex;
    flex: 0 0 45px;
    font-size: .85rem;
    justify-content: center;
}

.auth-input input {
    background: transparent;
    border: 0;
    color: #25212a;
    flex: 1 1 auto;
    font-size: .9rem;
    height: 48px;
    min-width: 0;
    outline: 0;
    padding: 0 .8rem 0 0;
}

.auth-input input::placeholder {
    color: #a3a8ae;
}

.auth-input__toggle {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    color: #8d8595;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 46px;
    justify-content: center;
    transition: background-color .18s ease, color .18s ease;
}

.auth-input__toggle:hover,
.auth-input__toggle:focus-visible {
    background: #f4effa;
    color: var(--auth-accent);
    outline: 0;
}

.auth-form .auth-validation-message {
    align-items: flex-start;
    animation: auth-validation-enter .18s ease-out both;
    background: #fff3f5;
    border: 1px solid #f0c9ce;
    border-radius: 9px;
    color: #9f3340;
    display: flex;
    font-size: .69rem;
    font-weight: 650;
    gap: .43rem;
    line-height: 1.4;
    margin: .45rem 0 0;
    padding: .46rem .58rem;
}

.auth-form .auth-validation-message::before {
    color: #bd4351;
    content: "\f06a";
    flex: 0 0 auto;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-size: .7rem;
    font-weight: 900;
    margin-top: .12rem;
}

.auth-form .auth-validation-message:empty {
    display: none;
}

@keyframes auth-validation-enter {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-submit {
    align-items: center;
    background: var(--auth-accent);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 9px 22px rgba(111, 66, 193, .22);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: .9rem;
    font-weight: 750;
    justify-content: center;
    margin-top: 1.6rem;
    min-height: 50px;
    padding: .7rem 1.1rem;
    position: relative;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 100%;
}

.auth-submit:hover:not(:disabled) {
    background: var(--auth-accent-dark);
    box-shadow: 0 12px 28px rgba(111, 66, 193, .28);
    transform: translateY(-1px);
}

.auth-submit:focus-visible {
    box-shadow: 0 0 0 4px rgba(111, 66, 193, .18);
    outline: 0;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .76;
}

.auth-submit__arrow {
    position: absolute;
    right: 1.1rem;
    transition: transform .18s ease;
}

.auth-submit:hover:not(:disabled) .auth-submit__arrow {
    transform: translateX(2px);
}

.auth-submit__spinner {
    animation: auth-spin .7s linear infinite;
    border: 2px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    border-top-color: #fff;
    display: none;
    height: 17px;
    margin-right: .55rem;
    width: 17px;
}

.auth-submit.is-loading .auth-submit__spinner {
    display: inline-block;
}

.auth-submit.is-loading .auth-submit__arrow {
    display: none;
}

.auth-divider {
    align-items: center;
    color: #9a9fa5;
    display: flex;
    font-size: .7rem;
    gap: .75rem;
    margin: 1.45rem 0 1.1rem;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    background: #e7e8eb;
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

.auth-register {
    color: var(--auth-muted);
    font-size: .82rem;
    margin: 0;
    text-align: center;
}

.auth-register a {
    color: var(--auth-accent);
    font-weight: 750;
    text-decoration: none;
}

.auth-register a:hover {
    color: var(--auth-accent-dark);
    text-decoration: underline;
}

.auth-form-footer {
    align-items: center;
    border-top: 1px solid #ececef;
    color: #999ea4;
    display: flex;
    font-size: .66rem;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2.25rem;
    padding-top: 1rem;
}

.auth-shell--scrollable {
    overflow-y: auto;
}

.auth-card--compact {
    min-height: min(710px, calc(100vh - 5rem));
}

.auth-card--result {
    min-height: min(650px, calc(100vh - 5rem));
}

.auth-result-panel {
    text-align: center;
}

.auth-result {
    max-width: 430px;
}

.auth-result .auth-mobile-brand {
    text-align: left;
}

.auth-result__icon {
    align-items: center;
    background: #eaf8f3;
    border: 1px solid #c5eadc;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(33, 136, 56, .12);
    color: #218838;
    display: inline-flex;
    font-size: 1.55rem;
    height: 78px;
    justify-content: center;
    margin-bottom: 1.65rem;
    position: relative;
    width: 78px;
}

.auth-result__icon::after {
    border: 1px solid rgba(33, 136, 56, .13);
    border-radius: 29px;
    content: "";
    inset: -7px;
    position: absolute;
}

.auth-result__icon--danger {
    background: #fdecec;
    border-color: #f5c6cb;
    box-shadow: 0 12px 30px rgba(197, 39, 44, .12);
    color: #c5272c;
}

.auth-result__icon--danger::after {
    border-color: rgba(197, 39, 44, .13);
}

.auth-result__header p {
    line-height: 1.65;
    margin-left: auto;
    margin-right: auto;
    max-width: 390px;
}

.auth-result__status {
    align-items: flex-start;
    background: #f8f5fc;
    border: 1px solid #e8ddf7;
    border-radius: 13px;
    display: flex;
    gap: .8rem;
    margin-top: 1.6rem;
    padding: .9rem 1rem;
    text-align: left;
}

.auth-result__status > span {
    align-items: center;
    background: #eee6f9;
    border-radius: 9px;
    color: var(--auth-accent);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
}

.auth-result__status strong,
.auth-result__status p {
    display: block;
}

.auth-result__status strong {
    color: #39323f;
    font-size: .8rem;
}

.auth-result__status p {
    color: var(--auth-muted);
    font-size: .72rem;
    line-height: 1.5;
    margin: .18rem 0 0;
}

.auth-result__action {
    text-decoration: none;
}

.auth-result__action:hover,
.auth-result__action:focus {
    color: #fff;
    text-decoration: none;
}

.auth-result__footer {
    margin-top: 2rem;
    text-align: left;
}

.auth-card--register {
    min-height: min(880px, calc(100vh - 3rem));
}

.auth-form-panel--register {
    align-items: flex-start;
    padding-bottom: 2rem;
    padding-top: 2rem;
}

.auth-form-wrap--register {
    max-width: 440px;
}

.auth-form--register {
    margin-top: 1.55rem;
}

.auth-form--register .auth-field {
    margin-bottom: .9rem;
}

.auth-back-link {
    align-items: center;
    color: var(--auth-muted);
    display: inline-flex;
    font-size: .76rem;
    font-weight: 700;
    gap: .48rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}

.auth-back-link:hover {
    color: var(--auth-accent);
    transform: translateX(-2px);
}

.auth-back-link i {
    font-size: .68rem;
}

.auth-security-note {
    align-items: flex-start;
    background: #f8f5fc;
    border: 1px solid #e8ddf7;
    border-radius: 12px;
    color: var(--auth-muted);
    display: flex;
    font-size: .75rem;
    gap: .7rem;
    line-height: 1.55;
    margin-top: 1.2rem;
    padding: .85rem .9rem;
}

.auth-security-note > span {
    align-items: center;
    background: #eee6f9;
    border-radius: 50%;
    color: var(--auth-accent);
    display: flex;
    flex: 0 0 29px;
    height: 29px;
    justify-content: center;
}

.auth-security-note p {
    margin: .12rem 0 0;
}

.auth-field__hint {
    color: var(--auth-muted);
    display: block;
    font-size: .68rem;
    line-height: 1.45;
    margin: -.1rem 0 .45rem;
}

.auth-field__help {
    align-items: flex-start;
    color: var(--auth-muted);
    display: flex;
    font-size: .68rem;
    gap: .4rem;
    line-height: 1.45;
    margin: .4rem .15rem 0;
}

.auth-field__help i {
    color: var(--auth-accent);
    margin-top: .13rem;
}

.auth-input--disabled {
    background: #f4f5f7;
}

.auth-input input:disabled {
    color: #646b72;
    cursor: not-allowed;
}

.auth-check {
    align-items: flex-start;
    color: var(--auth-muted);
    cursor: pointer;
    display: flex;
    font-size: .76rem;
    gap: .65rem;
    line-height: 1.5;
    margin: 1rem 0 .2rem;
    position: relative;
}

.auth-check__input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.auth-check__box {
    align-items: center;
    background: #fff;
    border: 1px solid #cfd3d8;
    border-radius: 6px;
    color: transparent;
    display: flex;
    flex: 0 0 21px;
    height: 21px;
    justify-content: center;
    margin-top: .05rem;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.auth-check__box i {
    font-size: .62rem;
}

.auth-check__input:checked + .auth-check__box {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    box-shadow: 0 5px 12px rgba(111, 66, 193, .2);
    color: #fff;
}

.auth-check:focus-within .auth-check__box {
    box-shadow: 0 0 0 4px rgba(111, 66, 193, .14);
}

.auth-inline-link {
    background: none;
    border: 0;
    color: var(--auth-accent);
    cursor: pointer;
    display: inline;
    font: inherit;
    font-weight: 750;
    padding: 0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.auth-inline-link:hover {
    color: var(--auth-accent-dark);
}

.auth-terms-modal .modal-body {
    color: #5f666d;
    font-size: .88rem;
    line-height: 1.7;
}

.auth-terms-modal .modal-body strong {
    color: #25212a;
    font-size: .94rem;
}

.auth-terms-modal__eyebrow {
    color: var(--auth-accent);
    display: block;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .11em;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .auth-card {
        grid-template-columns: minmax(0, 1fr);
        max-width: 560px;
        min-height: auto;
    }

    .auth-brand {
        display: none;
    }

    .auth-mobile-brand {
        display: flex;
    }

    .auth-form-panel {
        min-height: 680px;
    }

    .auth-card--register {
        max-width: 620px;
    }

    .auth-form-panel--register {
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        align-items: stretch;
        background: #fff;
        padding: 0;
    }

    .auth-shell__glow {
        display: none;
    }

    .auth-card {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    .auth-form-panel {
        align-items: flex-start;
        min-height: 100vh;
        padding: 2rem 1.25rem 1.25rem;
    }

    .auth-mobile-brand {
        margin-bottom: clamp(2.5rem, 12vh, 5rem);
    }

    .auth-card--register {
        min-height: 100vh;
    }

    .auth-card--result {
        min-height: 100vh;
    }

    .auth-result-panel {
        align-items: center;
        padding-top: 1.5rem;
    }

    .auth-result .auth-mobile-brand {
        margin-bottom: clamp(2.5rem, 9vh, 4.5rem);
    }

    .auth-form-panel--register {
        min-height: 100vh;
        padding-top: 1.5rem;
    }

    .auth-form-panel--register .auth-mobile-brand {
        margin-bottom: 2rem;
    }

    .auth-form-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
        margin-top: 1.75rem;
    }
}

@media (max-height: 720px) and (min-width: 901px) {
    .auth-card {
        min-height: calc(100vh - 2rem);
    }

    .auth-shell {
        padding-bottom: 1rem;
        padding-top: 1rem;
    }

    .auth-brand__content {
        padding: 1.75rem 0;
    }

    .auth-brand__content h2 {
        font-size: 2.2rem;
    }

    .auth-form-panel {
        padding-bottom: 2rem;
        padding-top: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit,
    .auth-submit__arrow,
    .auth-input,
    .auth-input__toggle {
        transition: none;
    }

    .auth-submit__spinner {
        animation-duration: 1.4s;
    }
}
