.auth-body {
    min-height: 100vh;
    margin: 0;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(99, 127, 246, 0.18),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #040c33,
            #07134d 48%,
            #0d1c5a
        );
}

.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-shell {
    display: grid;
    overflow: hidden;
    width: min(100%, 1500px);
    min-height: calc(100vh - 32px);
    grid-template-columns: minmax(420px, 500px) minmax(0, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: #07134d;
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.35);
}

.auth-shell-register {
    grid-template-columns: minmax(500px, 570px) minmax(0, 1fr);
}

.auth-form-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 24px clamp(24px, 3vw, 44px) 38px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(105, 132, 244, 0.13),
            transparent 28%
        ),
        linear-gradient(
            160deg,
            rgba(13, 28, 90, 0.98),
            rgba(7, 19, 77, 0.99)
        );
}

.auth-register-panel {
    overflow-y: auto;
}

.auth-panel-header {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.auth-logo-link {
    display: inline-flex;
}

.auth-logo {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.auth-close-button {
    display: inline-flex;
    width: 39px;
    height: 39px;
    align-items: center;
    justify-content: center;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.06);
    transition:
        color 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease;
}

.auth-close-button:hover,
.auth-close-button:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
}

.auth-close-button svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-form-container {
    width: 100%;
    max-width: 520px;
    margin: auto;
}

.auth-login-container {
    max-width: 430px;
}

.auth-heading {
    margin-bottom: 24px;
}

.auth-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #aebcff;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.auth-heading h1 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.045em;
}

.auth-heading p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.79rem;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-form-grid {
    display: grid;
    gap: 13px;
}

.auth-form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field {
    min-width: 0;
}

.auth-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.69rem;
    font-weight: 750;
}

.optional-label {
    color: rgba(255, 255, 255, 0.32);
    font-size: 0.57rem;
    font-weight: 700;
}

.auth-input-shell {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.065);
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease;
}

.auth-input-shell:focus-within {
    border-color: rgba(145, 166, 255, 0.65);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(85, 112, 230, 0.14);
}

.auth-field.has-error .auth-input-shell {
    border-color: rgba(255, 105, 120, 0.65);
}

.auth-input-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-left: 14px;
    color: rgba(255, 255, 255, 0.38);
}

.auth-input-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-control {
    width: 100%;
    height: 44px;
    min-width: 0;
    padding: 0 14px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    font-size: 0.78rem;
}

.auth-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-control:-webkit-autofill,
.auth-control:-webkit-autofill:hover,
.auth-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-password-control {
    padding-right: 45px;
}

.password-toggle-button {
    position: absolute;
    right: 5px;
    display: inline-flex;
    width: 37px;
    height: 37px;
    align-items: center;
    justify-content: center;
    padding: 9px;
    border: 0;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.44);
    background: transparent;
}

.password-toggle-button:hover,
.password-toggle-button:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.password-toggle-button svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-select-control {
    appearance: none;
    cursor: pointer;
}

.auth-select-control option {
    color: #07134d;
    background: #ffffff;
}

.phone-prefix {
    display: inline-flex;
    height: 28px;
    align-items: center;
    margin-left: 10px;
    padding: 0 9px;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
    color: #bdc8ff;
    font-size: 0.74rem;
    font-weight: 800;
}

.phone-control {
    padding-left: 11px;
}

.captcha-input-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 9px;
}

.captcha-challenge-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 5px;
}

.captcha-display {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #ffffff;
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 5px,
            rgba(255, 255, 255, 0.02) 5px,
            rgba(255, 255, 255, 0.02) 10px
        ),
        #102363;
    font-family: monospace;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 0 rgba(83, 111, 231, 0.7);
    user-select: none;
}

.captcha-refresh-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #b8c4ff;
    background: rgba(255, 255, 255, 0.06);
}

.captcha-refresh-button:hover,
.captcha-refresh-button:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.11);
}

.captcha-refresh-button svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-field-hint {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.58rem;
    line-height: 1.5;
}

.invalid-feedback,
.terms-error {
    display: none;
    margin-top: 5px;
    color: #ff8e9a;
    font-size: 0.62rem;
    line-height: 1.45;
}

.auth-field.has-error .invalid-feedback,
.terms-error.is-visible {
    display: block;
}

.auth-terms-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: rgba(255, 255, 255, 0.53);
}

.auth-terms-field input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    accent-color: #7088f8;
}

.auth-terms-field label {
    font-size: 0.65rem;
    line-height: 1.6;
    cursor: pointer;
}

.auth-submit-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    border: 1px solid rgba(144, 165, 255, 0.62);
    border-radius: 999px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #3657d8,
            #758dfb
        );
    box-shadow: 0 12px 28px rgba(47, 76, 201, 0.3);
    font-size: 0.8rem;
    font-weight: 850;
}

.auth-submit-button:hover,
.auth-submit-button:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 15px 34px rgba(54, 87, 216, 0.42);
    transform: translateY(-1px);
}

.auth-submit-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.auth-submit-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spinner 650ms linear infinite;
}

@keyframes auth-spinner {
    to {
        transform: rotate(360deg);
    }
}

.auth-switch-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.68rem;
    text-align: center;
}

.auth-switch-text a {
    color: #bdc8ff;
    font-weight: 800;
}

.auth-switch-text a:hover,
.auth-switch-text a:focus {
    color: #ffffff;
}

.auth-form-alert {
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.68rem;
    line-height: 1.55;
}

.auth-form-alert.alert-success {
    color: #d7deff;
    border: 1px solid rgba(127, 153, 255, 0.25);
    background: rgba(80, 109, 230, 0.12);
}

.auth-form-alert.alert-danger {
    color: #ffc1c8;
    border: 1px solid rgba(255, 113, 128, 0.23);
    background: rgba(182, 46, 63, 0.1);
}

/* Visual panel */

.auth-visual-panel {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: flex-end;
    overflow: hidden;
    padding: clamp(38px, 5vw, 80px);
    background:
        radial-gradient(
            circle at 75% 30%,
            rgba(117, 143, 255, 0.22),
            transparent 27%
        ),
        linear-gradient(
            145deg,
            #07134d,
            #142b72 54%,
            #0d1c5a
        );
    isolation: isolate;
}

.auth-visual-decoration {
    position: absolute;
    z-index: -1;
    inset: 0;
}

.auth-orbit,
.auth-dot {
    position: absolute;
    display: block;
    border-radius: 50%;
}

.auth-orbit {
    border: 3px solid rgba(157, 176, 255, 0.28);
}

.auth-orbit-one {
    top: 15%;
    right: 20%;
    width: 30px;
    height: 30px;
}

.auth-orbit-two {
    top: 35%;
    left: 27%;
    width: 46px;
    height: 46px;
}

.auth-orbit-three {
    top: 58%;
    right: 24%;
    width: 70px;
    height: 70px;
    border-color: rgba(255, 255, 255, 0.1);
}

.auth-orbit-four {
    top: 27%;
    right: 42%;
    width: 22px;
    height: 22px;
}

.auth-dot {
    background: #8299ff;
    box-shadow: 0 0 12px rgba(130, 153, 255, 0.8);
}

.auth-dot-one {
    top: 19%;
    left: 23%;
    width: 8px;
    height: 8px;
}

.auth-dot-two {
    top: 48%;
    right: 32%;
    width: 5px;
    height: 5px;
}

.auth-dot-three {
    top: 67%;
    left: 45%;
    width: 7px;
    height: 7px;
}

.auth-dot-four {
    top: 77%;
    right: 15%;
    width: 4px;
    height: 4px;
}

.auth-visual-content {
    max-width: 650px;
}

.auth-visual-label {
    display: block;
    margin-bottom: 11px;
    color: #aebcff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.17em;
}

.auth-visual-content h2 {
    margin: 0 0 13px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.auth-visual-content p {
    max-width: 590px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.59);
    font-size: 0.9rem;
    line-height: 1.8;
}

.auth-security-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-security-points span {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.61rem;
    font-weight: 750;
}

@media (max-width: 991.98px) {
    .auth-page {
        padding: 0;
    }

    .auth-shell,
    .auth-shell-register {
        min-height: 100vh;
        grid-template-columns: minmax(0, 1fr);
        border: 0;
        border-radius: 0;
    }

    .auth-form-panel {
        min-height: 100vh;
        border-right: 0;
    }

    .auth-visual-panel {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 18px 16px 32px;
    }

    .auth-panel-header {
        margin-bottom: 14px;
    }

    .auth-logo {
        width: 124px;
    }

    .auth-close-button {
        width: 36px;
        height: 36px;
    }

    .auth-form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .captcha-input-grid {
        grid-template-columns: minmax(0, 1fr) 125px;
    }

    .auth-heading h1 {
        font-size: 2rem;
    }
}

@media (max-width: 390px) {
    .captcha-input-grid {
        grid-template-columns: 1fr;
    }

    .captcha-challenge-area {
        grid-template-columns: minmax(0, 1fr) 45px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit-spinner {
        animation: none;
    }
}