/* ============================================================
   ServeBees
   Passkey Registration

   Public / Guest Theme
   Futuristic Blue Bee + White

   Matched to:
   passkey_register.html
   passkey-register.js
   ============================================================ */


/* ============================================================
   Page
   ============================================================ */

.passkey-page {
    position: relative;
    isolation: isolate;

    min-height: calc(100svh - var(--header-height, 72px));

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        clamp(3rem, 6vw, 5.5rem)
        clamp(1rem, 4vw, 2rem);

    overflow: hidden;

    color: var(--public-text, #10213d);

    background:
        radial-gradient(
            circle at 10% 16%,
            rgba(82, 182, 255, 0.18),
            transparent 32%
        ),
        radial-gradient(
            circle at 89% 78%,
            rgba(57, 121, 246, 0.12),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #ffffff 0%,
            var(--public-background, #f7faff) 48%,
            var(--public-background-alt, #eef5ff) 100%
        );
}


/* ============================================================
   Futuristic Background Grid
   ============================================================ */

.passkey-page::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -2;

    pointer-events: none;

    opacity: 0.48;

    background-image:
        linear-gradient(
            rgba(31, 95, 224, 0.04) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(31, 95, 224, 0.04) 1px,
            transparent 1px
        );

    background-size: 52px 52px;
}


/* ============================================================
   Ambient Glow
   ============================================================ */

.passkey-page::after {
    content: "";

    position: absolute;

    width: min(54rem, 95vw);
    height: min(54rem, 95vw);

    top: 52%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: -1;

    border-radius: 50%;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(82, 182, 255, 0.12) 0%,
            rgba(57, 121, 246, 0.05) 44%,
            transparent 74%
        );
}


/* ============================================================
   Main Shell
   ============================================================ */

.passkey-shell {
    width: min(100%, 72rem);

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(26rem, 0.82fr);

    gap:
        clamp(2.5rem, 6vw, 6rem);

    align-items: center;

    margin-inline: auto;
}


/* ============================================================
   Intro Panel
   ============================================================ */

.passkey-intro {
    position: relative;

    display: flex;
    align-items: center;
}


.passkey-intro-content {
    width: 100%;
    max-width: 34rem;
}


.passkey-kicker {
    display: inline-flex;
    align-items: center;

    margin-bottom: 1rem;

    padding:
        0.42rem
        0.7rem;

    border:
        1px solid
        rgba(31, 95, 224, 0.13);

    border-radius: 999px;

    color:
        var(
            --public-primary,
            #1f5fe0
        );

    background:
        rgba(255, 255, 255, 0.64);

    box-shadow:
        0 6px 20px rgba(31, 95, 224, 0.06);

    font-size: 0.71rem;
    font-weight: 760;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.passkey-intro-title {
    margin: 0;

    color:
        var(
            --public-text,
            #10213d
        );

    font-size:
        clamp(
            2.6rem,
            6vw,
            4.6rem
        );

    font-weight: 790;
    line-height: 0.98;

    letter-spacing: -0.065em;
}


.passkey-intro-title span {
    display: block;

    color:
        var(
            --public-primary,
            #1f5fe0
        );
}


.passkey-intro-description {
    max-width: 31rem;

    margin:
        1.4rem
        0
        0;

    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-size: 1rem;
    line-height: 1.75;
}


/* ============================================================
   Benefits
   ============================================================ */

.passkey-benefits {
    display: grid;

    gap: 1rem;

    margin-top: 2.2rem;
}


.passkey-benefit {
    display: grid;
    grid-template-columns: auto 1fr;

    gap: 0.9rem;

    align-items: flex-start;

    padding:
        0.95rem
        1rem;

    border:
        1px solid
        rgba(31, 95, 224, 0.1);

    border-radius: 1rem;

    background:
        rgba(255, 255, 255, 0.5);

    transition:
        border-color 170ms ease,
        background-color 170ms ease,
        transform 170ms ease,
        box-shadow 170ms ease;
}


.passkey-benefit:hover {
    transform: translateY(-1px);

    border-color:
        rgba(31, 95, 224, 0.18);

    background:
        rgba(255, 255, 255, 0.78);

    box-shadow:
        0 10px 32px rgba(31, 95, 224, 0.06);
}


.passkey-benefit-icon {
    width: 2.25rem;
    height: 2.25rem;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 0.7rem;

    color:
        var(
            --public-primary,
            #1f5fe0
        );

    background:
        rgba(57, 121, 246, 0.085);
}


.passkey-benefit-icon svg {
    width: 1.08rem;
    height: 1.08rem;

    fill: currentColor;
}


.passkey-benefit strong {
    display: block;

    margin-bottom: 0.2rem;

    color:
        var(
            --public-text,
            #10213d
        );

    font-size: 0.85rem;
    font-weight: 720;
}


.passkey-benefit span {
    display: block;

    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-size: 0.78rem;
    line-height: 1.55;
}


/* ============================================================
   Registration Panel
   ============================================================ */

.passkey-register-panel {
    width: 100%;
    max-width: 32rem;

    justify-self: end;
}


/* ============================================================
   Card
   ============================================================ */

.passkey-card {
    position: relative;

    width: 100%;

    padding:
        clamp(
            1.75rem,
            4vw,
            2.75rem
        );

    overflow: hidden;

    border:
        1px solid
        var(
            --public-border,
            rgba(31, 95, 224, 0.14)
        );

    border-radius: 1.75rem;

    background:
        var(
            --public-surface,
            rgba(255, 255, 255, 0.88)
        );

    box-shadow:
        var(
            --public-shadow,
            0 24px 70px rgba(24, 76, 192, 0.12)
        ),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}


.passkey-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 12%;
    right: 12%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(82, 182, 255, 0.68),
            var(--public-primary, #1f5fe0),
            rgba(82, 182, 255, 0.68),
            transparent
        );
}


.passkey-card::after {
    content: "";

    position: absolute;

    width: 14rem;
    height: 14rem;

    top: -8rem;
    right: -7rem;

    pointer-events: none;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(82, 182, 255, 0.17),
            transparent 70%
        );
}


/* ============================================================
   Brand
   ============================================================ */

.passkey-brand {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    gap: 0.7rem;

    margin-bottom: 2rem;

    color: inherit;

    text-decoration: none;
}


.passkey-brand-mark {
    width: 2.55rem;
    height: 2.55rem;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 0.85rem;

    color: #ffffff;

    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;

    background:
        linear-gradient(
            135deg,
            var(--public-accent, #52b6ff),
            var(--public-primary, #1f5fe0) 55%,
            var(--sb-blue-800, #183f99)
        );

    box-shadow:
        0 10px 26px rgba(31, 95, 224, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);

    transition:
        transform 170ms ease,
        box-shadow 170ms ease;
}


.passkey-brand:hover .passkey-brand-mark {
    transform: translateY(-1px);

    box-shadow:
        0 13px 30px rgba(31, 95, 224, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}


.passkey-brand-name {
    color:
        var(
            --public-text,
            #10213d
        );

    font-size: 1.08rem;
    font-weight: 760;

    letter-spacing: -0.025em;
}


/* ============================================================
   Card Header
   ============================================================ */

.passkey-card-header {
    position: relative;
    z-index: 2;

    margin-bottom: 1.8rem;
}


.passkey-card-eyebrow {
    display: inline-flex;

    margin-bottom: 0.65rem;

    color:
        var(
            --public-primary,
            #1f5fe0
        );

    font-size: 0.72rem;
    font-weight: 760;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.passkey-card-title {
    margin: 0;

    color:
        var(
            --public-text,
            #10213d
        );

    font-size:
        clamp(
            1.85rem,
            5vw,
            2.45rem
        );

    font-weight: 780;
    line-height: 1.05;

    letter-spacing: -0.05em;
}


.passkey-card-description {
    margin:
        0.85rem
        0
        0;

    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-size: 0.9rem;
    line-height: 1.65;
}


/* ============================================================
   Form
   ============================================================ */

.passkey-form {
    position: relative;
    z-index: 2;

    display: grid;

    gap: 1.25rem;
}


/* ============================================================
   Field
   ============================================================ */

.passkey-field {
    display: grid;

    gap: 0.5rem;
}


.passkey-label {
    color:
        var(
            --public-text,
            #10213d
        );

    font-size: 0.83rem;
    font-weight: 670;
}


/* ============================================================
   Input Shell
   ============================================================ */

.passkey-input-shell {
    position: relative;

    display: flex;
    align-items: center;
}


/* ============================================================
   Input Icon
   ============================================================ */

.passkey-input-icon {
    position: absolute;

    left: 1rem;

    width: 1.12rem;
    height: 1.12rem;

    display: grid;
    place-items: center;

    pointer-events: none;

    color:
        var(
            --public-text-soft,
            #8996a8
        );

    transition:
        color 160ms ease,
        transform 160ms ease;
}


.passkey-input-icon svg {
    width: 100%;
    height: 100%;

    fill: currentColor;
}


.passkey-input-shell:focus-within
.passkey-input-icon {
    color:
        var(
            --public-primary,
            #1f5fe0
        );

    transform: scale(1.04);
}


/* ============================================================
   Input
   ============================================================ */

.passkey-input {
    width: 100%;

    min-height: 3.25rem;

    padding:
        0.9rem
        3rem
        0.9rem
        2.85rem;

    border:
        1px solid
        var(
            --public-border,
            rgba(31, 95, 224, 0.14)
        );

    border-radius: 0.95rem;

    outline: none;

    color:
        var(
            --public-text,
            #10213d
        );

    font: inherit;
    font-size: 0.94rem;

    background:
        rgba(255, 255, 255, 0.82);

    box-shadow:
        inset 0 1px 2px rgba(16, 33, 61, 0.025);

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}


.passkey-input::placeholder {
    color:
        var(
            --public-text-soft,
            #8996a8
        );
}


.passkey-input:hover {
    border-color:
        var(
            --public-border-strong,
            rgba(31, 95, 224, 0.26)
        );

    background:
        rgba(255, 255, 255, 0.96);
}


.passkey-input:focus {
    border-color:
        var(
            --public-primary,
            #1f5fe0
        );

    background: #ffffff;

    box-shadow:
        var(
            --public-focus,
            0 0 0 4px rgba(57, 121, 246, 0.14)
        );
}


/* ============================================================
   Input Validation
   Used by passkey-register.js
   ============================================================ */

.passkey-input.is-invalid {
    border-color:
        rgba(220, 38, 38, 0.58);

    background:
        rgba(255, 250, 250, 0.98);

    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.07);
}


.passkey-input.is-valid {
    border-color:
        rgba(16, 185, 129, 0.46);

    background:
        rgba(249, 255, 252, 0.98);

    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.06);
}


/* ============================================================
   Field State
   ============================================================ */

.passkey-field-state {
    position: absolute;

    right: 1rem;

    width: 0.72rem;
    height: 0.72rem;

    border-radius: 50%;

    pointer-events: none;

    opacity: 0;

    transform: scale(0.7);

    transition:
        opacity 160ms ease,
        transform 160ms ease,
        background-color 160ms ease;
}


.passkey-input.is-valid
~ .passkey-field-state {
    opacity: 1;

    transform: scale(1);

    background:
        #10b981;

    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.1);
}


.passkey-input.is-invalid
~ .passkey-field-state {
    opacity: 1;

    transform: scale(1);

    background:
        #dc2626;

    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.08);
}


/* ============================================================
   Field Message
   ============================================================ */

.passkey-field-message {
    min-height: 1rem;

    color: #b42318;

    font-size: 0.74rem;
    line-height: 1.45;
}


/* ============================================================
   Submit Button
   ============================================================ */

.passkey-submit {
    position: relative;

    width: 100%;

    min-height: 3.35rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.7rem;

    padding:
        0.85rem
        1.2rem;

    border: 0;
    border-radius: 1rem;

    overflow: hidden;

    cursor: pointer;

    color: #ffffff;

    font: inherit;
    font-size: 0.94rem;
    font-weight: 720;

    letter-spacing: -0.01em;

    background:
        linear-gradient(
            135deg,
            var(--public-accent, #52b6ff) -20%,
            var(--public-primary, #1f5fe0) 48%,
            var(--sb-blue-700, #184cc0) 100%
        );

    box-shadow:
        0 13px 30px rgba(31, 95, 224, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);

    transition:
        transform 170ms ease,
        box-shadow 170ms ease,
        filter 170ms ease,
        opacity 170ms ease;
}


/* Shine */

.passkey-submit::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    left: -45%;

    width: 35%;

    pointer-events: none;

    transform: skewX(-18deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.22),
            transparent
        );

    transition:
        left 420ms ease;
}


.passkey-submit:hover::before {
    left: 115%;
}


.passkey-submit:hover {
    transform: translateY(-1px);

    filter:
        saturate(1.08);

    box-shadow:
        0 17px 38px rgba(31, 95, 224, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}


.passkey-submit:active {
    transform:
        translateY(0);
}


.passkey-submit:focus-visible {
    outline: none;

    box-shadow:
        var(
            --public-focus,
            0 0 0 4px rgba(57, 121, 246, 0.14)
        ),
        0 15px 34px rgba(31, 95, 224, 0.28);
}


.passkey-submit:disabled {
    cursor: not-allowed;

    opacity: 0.68;

    transform: none;
}


/* ============================================================
   Button Icons
   ============================================================ */

.passkey-submit-icon,
.passkey-submit-arrow {
    position: relative;
    z-index: 1;

    width: 1.2rem;
    height: 1.2rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
}


.passkey-submit-icon svg,
.passkey-submit-arrow svg {
    width: 100%;
    height: 100%;

    fill: currentColor;
}


.passkey-submit-arrow {
    margin-left: 0.1rem;

    opacity: 0.86;

    transition:
        transform 170ms ease;
}


.passkey-submit:hover
.passkey-submit-arrow {
    transform:
        translateX(2px);
}


/* ============================================================
   Spinner
   ============================================================ */

.passkey-spinner {
    display: none;

    position: relative;
    z-index: 1;

    width: 1rem;
    height: 1rem;

    flex: 0 0 auto;

    border:
        2px solid
        rgba(255, 255, 255, 0.35);

    border-top-color:
        #ffffff;

    border-radius: 50%;
}


.passkey-submit.is-loading
.passkey-spinner {
    display: inline-block;

    animation:
        passkey-register-spinner
        700ms
        linear
        infinite;
}


.passkey-submit.is-loading
.passkey-submit-icon,
.passkey-submit.is-loading
.passkey-submit-arrow {
    display: none;
}


.passkey-submit > span {
    position: relative;
    z-index: 1;
}


@keyframes passkey-register-spinner {
    to {
        transform:
            rotate(360deg);
    }
}


/* ============================================================
   Status
   ============================================================ */

.passkey-status {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-start;

    gap: 0.65rem;

    margin-top: 1.15rem;

    padding:
        0.85rem
        1rem;

    border:
        1px solid
        transparent;

    border-radius: 0.9rem;

    font-size: 0.82rem;
    line-height: 1.5;
}


.passkey-status[hidden] {
    display: none;
}


.passkey-status.is-info {
    color:
        var(
            --public-primary-hover,
            #184cc0
        );

    border-color:
        rgba(31, 95, 224, 0.14);

    background:
        rgba(82, 182, 255, 0.09);
}


.passkey-status.is-success {
    color:
        #087249;

    border-color:
        rgba(16, 185, 129, 0.2);

    background:
        rgba(16, 185, 129, 0.08);
}


.passkey-status.is-error {
    color:
        #b42318;

    border-color:
        rgba(220, 38, 38, 0.18);

    background:
        rgba(220, 38, 38, 0.065);
}


/* ============================================================
   Device Security
   ============================================================ */

.passkey-security {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-start;

    gap: 0.8rem;

    margin-top: 1.45rem;

    padding:
        1rem
        1.05rem;

    border:
        1px solid
        var(
            --public-border,
            rgba(31, 95, 224, 0.14)
        );

    border-radius: 1rem;

    background:
        linear-gradient(
            135deg,
            rgba(243, 248, 255, 0.86),
            rgba(229, 240, 255, 0.58)
        );
}


.passkey-security-icon {
    width: 2rem;
    height: 2rem;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    margin-top: 0.05rem;

    border-radius: 0.65rem;

    color:
        var(
            --public-primary,
            #1f5fe0
        );

    background:
        rgba(57, 121, 246, 0.09);
}


.passkey-security-icon svg {
    width: 1rem;
    height: 1rem;

    fill: currentColor;
}


.passkey-security-copy {
    min-width: 0;
}


.passkey-security-copy strong {
    display: block;

    margin-bottom: 0.25rem;

    color:
        var(
            --public-text,
            #10213d
        );

    font-size: 0.82rem;
    font-weight: 720;
}


.passkey-security-copy p {
    margin: 0;

    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-size: 0.76rem;
    line-height: 1.55;
}


/* ============================================================
   Login Link
   ============================================================ */

.passkey-login {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 0.35rem;

    margin-top: 1.65rem;

    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-size: 0.84rem;

    text-align: center;
}


.passkey-login a {
    color:
        var(
            --public-primary,
            #1f5fe0
        );

    font-weight: 680;

    text-decoration: none;

    transition:
        color 160ms ease;
}


.passkey-login a:hover {
    color:
        var(
            --public-primary-hover,
            #184cc0
        );

    text-decoration: underline;
    text-underline-offset: 0.18em;
}


/* ============================================================
   Legal
   ============================================================ */

.passkey-legal {
    max-width: 29rem;

    margin:
        1.25rem
        auto
        0;

    padding-inline:
        0.5rem;

    color:
        var(
            --public-text-soft,
            #8996a8
        );

    font-size: 0.72rem;
    line-height: 1.6;

    text-align: center;
}


.passkey-legal a {
    color:
        var(
            --public-text-muted,
            #63728a
        );

    font-weight: 600;

    text-decoration: none;

    transition:
        color 160ms ease;
}


.passkey-legal a:hover {
    color:
        var(
            --public-primary,
            #1f5fe0
        );
}


/* ============================================================
   Autofill
   ============================================================ */

.passkey-input:-webkit-autofill,
.passkey-input:-webkit-autofill:hover,
.passkey-input:-webkit-autofill:focus {
    -webkit-text-fill-color:
        var(
            --public-text,
            #10213d
        );

    box-shadow:
        0 0 0 1000px
        #ffffff
        inset;

    transition:
        background-color
        9999s
        ease-in-out
        0s;
}


/* ============================================================
   Tablet
   ============================================================ */

@media (max-width: 960px) {

    .passkey-shell {
        grid-template-columns: 1fr;

        max-width: 35rem;

        gap: 2.4rem;
    }


    .passkey-intro {
        text-align: center;
    }


    .passkey-intro-content {
        max-width: none;
    }


    .passkey-intro-description {
        margin-inline: auto;
    }


    .passkey-benefits {
        display: none;
    }


    .passkey-intro-title {
        font-size:
            clamp(
                2.4rem,
                9vw,
                3.6rem
            );
    }


    .passkey-register-panel {
        justify-self: center;

        max-width: 32rem;
    }

}


/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 560px) {

    .passkey-page {
        align-items: flex-start;

        padding:
            1.5rem
            0.85rem
            2.5rem;
    }


    .passkey-shell {
        gap: 1.65rem;
    }


    .passkey-intro {
        text-align: left;

        padding-inline:
            0.25rem;
    }


    .passkey-kicker {
        margin-bottom:
            0.8rem;
    }


    .passkey-intro-title {
        font-size:
            clamp(
                2.25rem,
                12vw,
                3rem
            );
    }


    .passkey-intro-description {
        margin-top:
            1rem;

        font-size:
            0.9rem;
    }


    .passkey-card {
        padding:
            1.5rem
            1.25rem;

        border-radius:
            1.4rem;
    }


    .passkey-brand {
        margin-bottom:
            1.7rem;
    }


    .passkey-card-title {
        font-size:
            clamp(
                1.75rem,
                8vw,
                2.2rem
            );
    }


    .passkey-security {
        padding:
            0.9rem;
    }

}


/* ============================================================
   Very Small Screens
   ============================================================ */

@media (max-width: 360px) {

    .passkey-card {
        padding:
            1.35rem
            1rem;
    }


    .passkey-login {
        display: grid;

        gap:
            0.2rem;
    }

}


/* ============================================================
   Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .passkey-benefit,
    .passkey-brand-mark,
    .passkey-input,
    .passkey-input-icon,
    .passkey-field-state,
    .passkey-submit,
    .passkey-submit::before,
    .passkey-submit-arrow,
    .passkey-login a,
    .passkey-legal a {
        transition: none;
    }


    .passkey-submit::before {
        display: none;
    }


    .passkey-submit.is-loading
    .passkey-spinner {
        animation-duration:
            1.4s;
    }

}