:root {
    --authsp-bg: #030511;
    --authsp-panel: rgba(10, 15, 29, 0.74);
    --authsp-panel-strong: rgba(12, 18, 34, 0.92);
    --authsp-border: rgba(148, 184, 255, 0.16);
    --authsp-text: #f7fbff;
    --authsp-muted: #9aaac2;
    --authsp-blue: #2f7cf6;
    --authsp-cyan: #29d7ff;
    --authsp-purple: #8b5cf6;
    --authsp-pink: #e879f9;
    --authsp-green: #39f0a2;
    --authsp-danger: #ff5f7a;
}

* {
    box-sizing: border-box;
}

body.authsp-auth-page {
    height: auto !important;
    min-height: 100vh;
    margin: 0;
    color: var(--authsp-text);
    background:
        radial-gradient(circle at 14% 10%, rgba(47, 124, 246, 0.28), transparent 28%),
        radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.25), transparent 26%),
        radial-gradient(circle at 50% 95%, rgba(41, 215, 255, 0.12), transparent 30%),
        linear-gradient(135deg, #030511 0%, #070b18 46%, #02030a 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    overflow-y: auto !important;
}

body.authsp-auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.2;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 92%);
}

body.authsp-auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(520px circle at var(--auth-x, 52vw) var(--auth-y, 34vh), rgba(47, 124, 246, 0.18), rgba(139, 92, 246, 0.10) 28%, transparent 64%);
    mix-blend-mode: screen;
    filter: blur(10px);
    transition: opacity 180ms ease;
}

body.authsp-auth-page .d-flex.flex-column,
body.authsp-auth-page .d-flex.flex-column-fluid,
body.authsp-auth-page .d-flex.flex-center {
    background: transparent !important;
}

.authsp-auth-shell {
    position: relative;
    z-index: 1;
    width: min(1160px, calc(100% - 32px));
    min-height: 100svh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(400px, 0.72fr);
    gap: 22px;
    align-items: start;
    padding: 18px 0;
}

.authsp-auth-shell-register {
    width: min(1220px, calc(100% - 32px));
    grid-template-columns: minmax(0, 0.84fr) minmax(520px, 0.78fr);
}

.authsp-auth-left,
.authsp-auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--authsp-border);
    background:
        linear-gradient(145deg, rgba(13, 21, 40, 0.78), rgba(5, 7, 16, 0.84)),
        rgba(255, 255, 255, 0.03);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(22px);
}

.authsp-auth-left {
    min-height: 590px;
    border-radius: 30px;
    padding: clamp(24px, 3vw, 36px);
}

.authsp-auth-left::before,
.authsp-auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        radial-gradient(circle at 25% 18%, rgba(47, 124, 246, 0.22), transparent 32%),
        radial-gradient(circle at 78% 28%, rgba(139, 92, 246, 0.16), transparent 30%),
        linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    opacity: 0.9;
}

.authsp-auth-left > *,
.authsp-auth-card > * {
    position: relative;
    z-index: 1;
}

.authsp-brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.authsp-brand-lockup img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 16px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 34px rgba(47, 124, 246, 0.26);
}

.authsp-brand-lockup strong {
    display: block;
    color: #fff;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
}

.authsp-brand-lockup span {
    display: block;
    color: var(--authsp-muted);
    font-size: 0.86rem;
}

.authsp-edge-visual {
    position: relative;
    min-height: 220px;
    margin: 22px 0 20px;
    display: grid;
    place-items: center;
}

.authsp-edge-ring {
    position: absolute;
    width: min(270px, 74%);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(89, 169, 255, 0.22);
    animation: authspSpin 18s linear infinite;
}

.authsp-edge-ring:nth-child(2) {
    width: min(200px, 55%);
    animation-duration: 12s;
    animation-direction: reverse;
}

.authsp-edge-ring:nth-child(3) {
    width: min(325px, 86%);
    animation-duration: 28s;
    border-color: rgba(139, 92, 246, 0.18);
}

@keyframes authspSpin {
    to {
        transform: rotate(360deg);
    }
}

.authsp-shield {
    position: relative;
    width: 112px;
    aspect-ratio: 0.86;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.2), transparent 18%),
        linear-gradient(145deg, rgba(41, 215, 255, 0.92), rgba(47, 124, 246, 0.82) 44%, rgba(139, 92, 246, 0.82));
    clip-path: polygon(50% 0, 94% 15%, 88% 68%, 50% 100%, 12% 68%, 6% 15%);
    filter: drop-shadow(0 0 44px rgba(47, 124, 246, 0.45));
    animation: shieldFloat 4.6s ease-in-out infinite;
}

.authsp-shield::before {
    content: "";
    position: absolute;
    inset: 12px;
    background: linear-gradient(145deg, rgba(4, 10, 24, 0.86), rgba(8, 14, 29, 0.72));
    clip-path: inherit;
}

.authsp-shield i {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    color: #dff8ff;
    text-shadow: 0 0 26px rgba(41, 215, 255, 0.72);
}

@keyframes shieldFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.02);
    }
}

.authsp-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--authsp-cyan);
    box-shadow: 0 0 0 8px rgba(41, 215, 255, 0.08), 0 0 28px rgba(41, 215, 255, 0.8);
}

.authsp-node:nth-of-type(1) { left: 18%; top: 26%; }
.authsp-node:nth-of-type(2) { right: 18%; top: 34%; background: var(--authsp-purple); }
.authsp-node:nth-of-type(3) { left: 24%; bottom: 20%; background: var(--authsp-green); }
.authsp-node:nth-of-type(4) { right: 26%; bottom: 16%; }

.authsp-auth-left h1 {
    margin: 0;
    max-width: 10ch;
    color: #fff;
    font-size: clamp(2.55rem, 4.4vw, 4.1rem);
    line-height: 0.94;
    letter-spacing: -0.08em;
}

.authsp-auth-left h1 span {
    display: block;
    color: #6edfff;
}

.authsp-auth-left p {
    margin: 14px 0 0;
    max-width: 52ch;
    color: #a9b8d1;
    font-size: 0.96rem;
    line-height: 1.55;
}

.authsp-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.authsp-feature-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.045);
    color: #edf6ff;
    font-weight: 800;
}

.authsp-feature-pill i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: rgba(47, 124, 246, 0.18);
    color: #8bdcff;
}

.authsp-auth-card {
    border-radius: 30px;
    padding: clamp(18px, 2.4vw, 28px);
}

.authsp-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.authsp-step {
    min-height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #91a5c4;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.authsp-step.is-active {
    color: #fff;
    border-color: rgba(41, 215, 255, 0.36);
    background: linear-gradient(135deg, rgba(47, 124, 246, 0.34), rgba(139, 92, 246, 0.24));
    box-shadow: 0 16px 34px rgba(47, 124, 246, 0.18);
}

.authsp-auth-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    line-height: 1;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.authsp-auth-card .authsp-auth-panel-subtitle {
    margin: 10px 0 0;
    color: var(--authsp-muted);
    line-height: 1.5;
}

.authsp-auth-switch {
    margin: 10px 0 15px;
    color: #aab8cf;
    font-weight: 700;
}

.authsp-auth-switch a,
.authsp-auth-card a,
body.authsp-auth-page .link-primary,
body.authsp-auth-page .text-hover-primary:hover {
    color: #9fd2ff !important;
    text-decoration: none;
}

.authsp-oauth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.authsp-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
    color: #f7fbff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.authsp-oauth-btn:hover,
.authsp-oauth-btn:focus {
    color: #fff;
    border-color: rgba(88, 153, 255, 0.48);
    background: linear-gradient(180deg, rgba(47, 124, 246, 0.24), rgba(139, 92, 246, 0.1));
    box-shadow: 0 18px 38px rgba(47, 124, 246, 0.18);
    transform: translateY(-1px);
}

.authsp-oauth-btn i {
    font-size: 18px;
}

.authsp-oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 13px 0;
    color: var(--authsp-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.authsp-oauth-divider::before,
.authsp-oauth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.authsp-oauth-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 87, 87, 0.22);
    background: rgba(255, 87, 87, 0.09);
    color: #ffd0d0;
    font-weight: 800;
}

.authsp-form-grid {
    display: grid;
    gap: 10px;
}

.authsp-field {
    position: relative;
}

.authsp-field label,
body.authsp-auth-page .form-label {
    display: block;
    margin: 0 0 6px;
    color: #dce8fb !important;
    font-weight: 850;
    font-size: 0.92rem !important;
}

.authsp-input-wrap {
    position: relative;
}

.authsp-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    font-size: 0.95rem;
    line-height: 1;
    color: #72b9ff;
    z-index: 2;
    pointer-events: none;
    opacity: 0.92;
}

body.authsp-auth-page .form-control,
body.authsp-auth-page .form-select,
body.authsp-auth-page .authsp-native-select {
    width: 100%;
    min-height: 44px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.052) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    color: var(--authsp-text) !important;
    box-shadow: none !important;
    padding: 0 16px;
    outline: none;
}

.authsp-input-wrap .form-control,
.authsp-input-wrap .form-select {
    padding-left: 56px !important;
}

.authsp-input-wrap .form-select,
.authsp-input-wrap .authsp-native-select {
    padding-right: 42px !important;
}

body.authsp-auth-page .form-control::placeholder {
    color: #7f8ca4;
}

body.authsp-auth-page .form-control:focus,
body.authsp-auth-page .form-select:focus,
body.authsp-auth-page .authsp-native-select:focus {
    border-color: rgba(41, 215, 255, 0.56) !important;
    box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.14) !important;
}

body.authsp-auth-page select option {
    background: #0b1020;
    color: #f7fbff;
}

.authsp-strength {
    margin-top: 12px;
}

.authsp-strength-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.authsp-strength-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--authsp-danger), #f59e0b, var(--authsp-green));
    transition: width 240ms ease, filter 240ms ease;
}

.authsp-strength-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #91a4c1;
    font-size: 0.82rem;
    font-weight: 700;
}

.authsp-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--authsp-blue), var(--authsp-purple));
    box-shadow: 0 22px 48px rgba(47, 124, 246, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.authsp-submit:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 28px 60px rgba(47, 124, 246, 0.34);
}

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

.authsp-trust span {
    min-height: 34px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b9c8dd;
    font-size: 0.78rem;
    font-weight: 850;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.authsp-consent-row,
body.authsp-auth-page .consent-row {
    margin: 12px 0 12px;
    padding: 12px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.consent-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #c8d4e8;
}

.consent-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: inline-grid;
    place-content: center;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid rgba(130, 168, 236, 0.58);
    border-radius: 6px;
    background: rgba(10, 18, 34, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 8px 20px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.consent-check input[type="checkbox"]:checked {
    border-color: rgba(56, 189, 248, 0.78);
    background-color: var(--authsp-blue);
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7.2 5.6 9.8 11 4.2' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.14), 0 10px 28px rgba(47, 124, 246, 0.26);
}

.consent-check input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: rgba(56,189,248,0.86);
    box-shadow: 0 0 0 4px rgba(47,124,246,0.18);
}

.authsp-auth-footnote {
    margin: 12px auto 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    color: var(--authsp-muted);
    font-size: 13px;
    line-height: 1.6;
}

body.authsp-auth-page .text-light,
body.authsp-auth-page .text-gray-400,
body.authsp-auth-page .text-muted {
    color: var(--authsp-muted) !important;
}

.authsp-auth-page .authsp-login-card {
    max-width: 500px;
    margin-left: auto;
}

.authsp-auth-page .authsp-register-card {
    max-width: 540px;
    margin-left: auto;
}

@media (min-width: 1081px) {
    .authsp-register-card .authsp-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .authsp-register-card .authsp-strength,
    .authsp-register-card .authsp-field .text-muted,
    .authsp-register-card .consent-row,
    .authsp-register-card .authsp-submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1080px) {
    .authsp-auth-shell {
        grid-template-columns: 1fr;
        padding: 24px 0;
    }

    .authsp-auth-left {
        min-height: auto;
    }

    .authsp-edge-visual {
        min-height: 200px;
        margin: 24px 0 18px;
    }

    .authsp-auth-left h1 {
        max-width: 100%;
    }

    .authsp-auth-page .authsp-login-card,
    .authsp-auth-page .authsp-register-card {
        max-width: none;
        margin: 0;
    }
}

@media (min-height: 860px) and (min-width: 1081px) {
    .authsp-auth-shell {
        align-items: center;
        padding: 24px 0;
    }
}

@media (max-width: 640px) {
    .authsp-auth-shell {
        width: min(100% - 16px, 1160px);
        min-height: auto;
        padding: 10px 0 22px;
        gap: 14px;
    }

    .authsp-auth-left,
    .authsp-auth-card {
        border-radius: 20px;
        padding: 16px;
    }

    .authsp-auth-left h1 {
        font-size: clamp(2rem, 11vw, 2.55rem);
        line-height: 1;
        letter-spacing: -0.06em;
    }

    .authsp-feature-list,
    .authsp-oauth-grid,
    .authsp-trust {
        grid-template-columns: 1fr;
    }

    .authsp-stepper {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .authsp-shield {
        width: 108px;
    }

    .authsp-edge-visual {
        min-height: 150px;
        margin: 14px 0;
    }

    .authsp-auth-left {
        min-height: auto;
    }

    .authsp-auth-card h2 {
        font-size: clamp(1.75rem, 9vw, 2.45rem);
        line-height: 1.04;
    }

    .authsp-input {
        min-height: 48px;
        border-radius: 15px;
    }

    .authsp-submit,
    .authsp-social {
        min-height: 48px;
        border-radius: 15px;
    }

    .authsp-auth-footnote {
        flex-wrap: wrap;
        gap: 8px 14px;
    }
}

@media (max-width: 420px) {
    .authsp-auth-shell {
        width: calc(100% - 12px);
        padding-top: 6px;
    }

    .authsp-auth-left {
        display: none;
    }

    .authsp-auth-card {
        padding: 15px;
        border-radius: 18px;
    }

    .authsp-auth-card h2 {
        font-size: 1.85rem;
    }

    .authsp-auth-card p,
    .authsp-field label,
    .authsp-auth-card .text-muted {
        font-size: 0.86rem;
    }

    .authsp-trust span {
        justify-content: flex-start;
        padding: 0 12px;
    }

    .authsp-consent-row,
    body.authsp-auth-page .consent-row {
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}
