.auth-shell {
    --auth-deep: #051923;
    --auth-navy: #0A1128;
    --auth-ink: #001F54;
    --auth-slate: #003554;
    --auth-indigo: #373ac9;
    --auth-ocean: #006494;
    --auth-blue: #0582CA;
    --auth-cyan: #00A6FB;
    --auth-teal: #1282A2;
    --auth-white: #FEFCFB;
    --auth-muted: rgba(254, 252, 251, 0.68);
    --auth-muted-strong: rgba(254, 252, 251, 0.86);
    --auth-line: rgba(55, 58, 201, 0.24);
    --auth-line-strong: rgba(55, 58, 201, 0.58);
    min-height: 100dvh;
    margin: 0;
    color: var(--auth-white);
    background: var(--auth-deep);
    font-feature-settings: "cv03", "cv04", "cv11";
}

.auth-shell * {
    box-sizing: border-box;
}

.auth-shell__page {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 32px 16px;
    background:
        radial-gradient(circle at 50% 34%, rgba(55, 58, 201, 0.22), transparent 32%),
        radial-gradient(circle at 16% 82%, rgba(18, 130, 162, 0.18), transparent 34%),
        linear-gradient(135deg, var(--auth-deep) 0%, var(--auth-navy) 46%, var(--auth-ink) 100%);
}

.auth-smokey-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0.98;
    pointer-events: none;
}

.auth-webgl .auth-shell__page {
    background: var(--auth-deep);
}

.auth-no-webgl .auth-smokey-canvas {
    display: none;
}

.auth-bg,
.auth-bg > span,
.auth-shell__page::before,
.auth-shell__page::after {
    position: absolute;
    pointer-events: none;
}

.auth-bg {
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.auth-shell__page::before {
    content: "";
    inset: -18%;
    background:
        conic-gradient(from 220deg at 50% 48%, transparent 0 16%, rgba(0, 166, 251, 0.24) 24%, transparent 36%, rgba(18, 130, 162, 0.2) 50%, transparent 64%, rgba(5, 130, 202, 0.18) 76%, transparent 88%),
        radial-gradient(circle at 58% 64%, rgba(55, 58, 201, 0.24), transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(0, 100, 148, 0.3), transparent 36%);
    filter: blur(58px);
    opacity: 0.86;
    animation: authFieldDrift 18s ease-in-out infinite alternate;
}

.auth-webgl .auth-shell__page::before,
.auth-webgl .auth-bg__ribbon,
.auth-webgl .auth-bg__veil {
    display: none;
}

.auth-shell__page::after {
    content: "";
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 25, 35, 0.04), rgba(5, 25, 35, 0.72)),
        radial-gradient(circle at 50% 50%, transparent 0, rgba(10, 17, 40, 0.42) 74%);
}

.auth-bg__grid {
    inset: -1px;
    z-index: 1;
    background:
        linear-gradient(rgba(0, 166, 251, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 166, 251, 0.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 42%, #051923 0 48%, transparent 78%);
    opacity: 0.34;
}

.auth-bg__ribbon {
    width: 76vw;
    height: 22vw;
    min-width: 760px;
    min-height: 220px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(5, 130, 202, 0.34), rgba(0, 166, 251, 0.24), transparent);
    filter: blur(28px);
    mix-blend-mode: screen;
    opacity: 0.76;
}

.auth-bg__ribbon--one {
    left: -18vw;
    top: 16vh;
    transform: rotate(-18deg);
    animation: authRibbonOne 14s ease-in-out infinite alternate;
}

.auth-bg__ribbon--two {
    right: -28vw;
    bottom: 10vh;
    transform: rotate(20deg);
    opacity: 0.56;
    animation: authRibbonTwo 17s ease-in-out infinite alternate;
}

.auth-bg__veil {
    inset: -15%;
    background:
        repeating-radial-gradient(circle at 48% 42%, rgba(254, 252, 251, 0.055) 0 1px, transparent 1px 24px),
        radial-gradient(circle at 22% 82%, rgba(18, 130, 162, 0.22), transparent 30%),
        radial-gradient(circle at 78% 18%, rgba(0, 166, 251, 0.16), transparent 32%);
    filter: blur(18px);
    opacity: 0.62;
    animation: authVeil 22s ease-in-out infinite alternate;
}

.auth-shell__frame {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.auth-brand__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.auth-brand__image {
    display: block;
    width: auto;
    max-width: 160px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 26px rgba(5, 25, 35, 0.72));
}

.auth-card {
    width: 100%;
    padding: 30px 30px;
    border: 1px solid var(--auth-line);
    border-radius: 18px;
    color: var(--auth-white);
    background:
        linear-gradient(180deg, rgba(0, 166, 251, 0.1), rgba(0, 31, 84, 0.12)),
        rgba(5, 25, 35, 0.68);
    box-shadow:
        0 30px 90px rgba(5, 25, 35, 0.74),
        0 0 80px rgba(0, 166, 251, 0.12),
        inset 0 1px 0 rgba(254, 252, 251, 0.12);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.auth-card--wide {
    width: min(100vw - 32px, 560px);
    margin-left: 50%;
    transform: translateX(-50%);
}

.auth-card__header {
    margin-bottom: 24px;
}

.auth-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-cyan);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card__header h2 {
    margin: 0;
    color: var(--auth-white);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-card__header p {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.5;
}

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

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

.auth-floating-field {
    display: flex;
    flex-direction: column-reverse;
    gap: 7px;
    min-width: 0;
}

.auth-input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 7px 12px 8px;
    border: 0;
    border-bottom: 1px solid var(--auth-line);
    border-radius: 0;
    color: var(--auth-white);
    background: transparent !important;
    box-shadow: none !important;
    outline: 0;
    caret-color: var(--auth-cyan);
    font-size: 15px;
    line-height: 1.4;
    appearance: none;
    transition: border-color 180ms ease;
}

.auth-input:focus {
    border-color: var(--auth-line-strong);
}

.auth-input.is-invalid {
    border-color: rgba(0, 166, 251, 0.78);
}

.auth-input::placeholder {
    color: transparent;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-white) !important;
    caret-color: var(--auth-cyan) !important;
    border-bottom-color: var(--auth-line-strong) !important;
    box-shadow: 0 0 0 1000px rgba(5, 25, 35, 0.86) inset !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(5, 25, 35, 0.86) inset !important;
    transition: background-color 99999s ease-out, color 99999s ease-out;
}

.auth-input:autofill {
    color: var(--auth-white) !important;
    background: rgba(5, 25, 35, 0.86) !important;
}

.auth-floating-field label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding-left: 12px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    pointer-events: auto;
    transform: none;
    transition: color 180ms ease;
}

.auth-input:focus + label,
.auth-input:not(:placeholder-shown) + label,
.auth-input:-webkit-autofill + label {
    color: var(--auth-cyan);
    transform: none;
}

.auth-field-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
}

.auth-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 24px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.45;
    cursor: pointer;
}

.auth-check input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: var(--auth-cyan);
    cursor: pointer;
}

.auth-check--terms {
    margin-top: -2px;
}

.auth-link,
.auth-card__footer a,
.auth-check a {
    color: var(--auth-cyan);
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.auth-link {
    flex: 0 0 auto;
    font-size: 12px;
}

.auth-link:hover,
.auth-card__footer a:hover,
.auth-check a:hover {
    color: var(--auth-white);
    text-decoration: none;
}

.auth-submit {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    color: var(--auth-white);
    background: linear-gradient(135deg, var(--auth-indigo) 0%, var(--auth-blue) 58%, #102058 100%);
    box-shadow: 0 14px 32px rgba(18, 29, 103, 0.34);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
    cursor: pointer;
    transition: box-shadow 180ms ease, filter 180ms ease, transform 180ms ease;
}

.auth-submit:hover,
.auth-submit:focus {
    color: var(--auth-white);
    box-shadow: 0 18px 38px rgba(18, 29, 103, 0.44);
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.auth-submit__icon {
    width: 19px;
    height: 19px;
    transition: transform 180ms ease;
}

.auth-submit:hover .auth-submit__icon,
.auth-submit:focus .auth-submit__icon {
    transform: translateX(3px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(254, 252, 251, 0.52);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--auth-line);
}

.auth-divider span {
    flex: 0 0 auto;
}

.auth-social-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: -10px;
}

.auth-social-grid--single {
    grid-template-columns: 1fr;
}

.auth-social-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    color: var(--auth-white);
    background: rgba(0, 53, 84, 0.42);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.auth-social-button:hover,
.auth-social-button:focus {
    color: var(--auth-white);
    border-color: var(--auth-line-strong);
    background: rgba(0, 100, 148, 0.48);
    text-decoration: none;
}

.auth-social-button__icon {
    width: 19px;
    height: 19px;
}

.auth-alert {
    margin-bottom: 24px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 166, 251, 0.34);
    border-radius: 10px;
    color: var(--auth-white);
    background: rgba(0, 31, 84, 0.48);
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert ul {
    padding-left: 18px;
}

.auth-alert strong {
    display: block;
    font-weight: 700;
}

.auth-recaptcha {
    min-width: 0;
    overflow-x: auto;
    margin-top: -4px;
}

.auth-card__footer {
    margin: 18px 0 0;
    color: rgba(254, 252, 251, 0.58);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.auth-submit:focus-visible,
.auth-social-button:focus-visible,
.auth-link:focus-visible,
.auth-card__footer a:focus-visible,
.auth-check input:focus-visible,
.auth-brand__link:focus-visible {
    outline: 3px solid rgba(0, 166, 251, 0.42);
    outline-offset: 3px;
}

@keyframes authFieldDrift {
    0% { transform: translate3d(-2%, -2%, 0) rotate(-4deg) scale(1); }
    100% { transform: translate3d(2%, 2%, 0) rotate(9deg) scale(1.08); }
}

@keyframes authRibbonOne {
    0% { transform: translate3d(-4%, 1%, 0) rotate(-18deg) scale(1); }
    100% { transform: translate3d(5%, -4%, 0) rotate(-10deg) scale(1.08); }
}

@keyframes authRibbonTwo {
    0% { transform: translate3d(3%, 3%, 0) rotate(20deg) scale(1); }
    100% { transform: translate3d(-5%, -3%, 0) rotate(13deg) scale(1.06); }
}

@keyframes authVeil {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate3d(2%, -2%, 0) scale(1.05); opacity: 0.7; }
}

@media (max-width: 575.98px) {
    .auth-shell__page {
        align-items: flex-start;
        min-height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 14px 12px 28px;
        background:
            radial-gradient(circle at 48% 100%, rgba(55, 58, 201, 0.36), transparent 38%),
            radial-gradient(circle at 22% 86%, rgba(0, 166, 251, 0.24), transparent 34%),
            linear-gradient(145deg, var(--auth-deep) 0%, var(--auth-navy) 54%, var(--auth-ink) 100%);
    }

    .auth-bg {
        position: fixed;
    }

    .auth-smokey-canvas {
        opacity: 1;
    }

    .auth-shell__frame {
        width: 100%;
    }

    .auth-brand {
        margin-bottom: 10px;
    }

    .auth-brand__link {
        min-height: 36px;
    }

    .auth-brand__image {
        max-width: 126px;
    }

    .auth-card,
    .auth-card--wide {
        width: 100%;
        margin-left: 0;
        transform: none;
        padding: 18px 16px;
        border-radius: 14px;
        background:
            linear-gradient(180deg, rgba(55, 58, 201, 0.12), rgba(0, 31, 84, 0.12)),
            rgba(5, 25, 35, 0.6);
    }

    .auth-card__header {
        margin-bottom: 16px;
    }

    .auth-card__header h2 {
        font-size: 22px;
    }

    .auth-card__header p {
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.35;
    }

    .auth-form,
    .auth-form-grid {
        gap: 13px;
    }

    .auth-form-grid,
    .auth-social-grid {
        grid-template-columns: 1fr;
    }

    .auth-form-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        margin-top: 0;
    }

    .auth-floating-field {
        gap: 5px;
    }

    .auth-floating-field label {
        padding-left: 8px;
        font-size: 12px;
    }

    .auth-input {
        height: 36px;
        padding: 6px 8px 7px;
        font-size: 14px;
    }

    .auth-check {
        gap: 7px;
        font-size: 11px;
        line-height: 1.35;
    }

    .auth-submit {
        min-height: 42px;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
    }

    .auth-card__footer {
        margin-top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell__page::before,
    .auth-bg__ribbon,
    .auth-bg__veil {
        animation: none;
    }

    .auth-floating-field label,
    .auth-input,
    .auth-submit,
    .auth-submit__icon,
    .auth-social-button,
    .auth-link,
    .auth-card__footer a {
        transition: none;
    }
}
