/* ============================================================
   ServeBees
   Passkey Login

   Public / Guest Theme
   Futuristic Blue Bee + White

   This stylesheet is intentionally matched to:
   passkey_login.html
   passkey-login.js
   ============================================================ */


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

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

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

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

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

    overflow: hidden;

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

    background:
        radial-gradient(
            circle at 14% 18%,
            rgba(82, 182, 255, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at 87% 79%,
            rgba(57, 121, 246, 0.12),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #ffffff 0%,
            var(--public-background, #f7faff) 50%,
            var(--public-background-alt, #eef5ff) 100%
        );
}


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

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

    position: absolute;
    inset: 0;

    z-index: -2;

    pointer-events: none;

    opacity: 0.5;

    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;
}


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

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

    position: absolute;

    width: min(48rem, 90vw);
    height: min(48rem, 90vw);

    top: 50%;
    left: 50%;

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

    z-index: -1;

    pointer-events: none;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(82, 182, 255, 0.12) 0%,
            rgba(57, 121, 246, 0.055) 42%,
            transparent 72%
        );
}


/* ============================================================
   Container
   ============================================================ */

.auth-container {
    position: relative;

    width: 100%;
    max-width: 32rem;

    margin-inline: auto;
}


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

.auth-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);
}


/* ============================================================
   Card Top Light
   ============================================================ */

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

    position: absolute;

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

    height: 1px;

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


/* ============================================================
   Card Accent Glow
   ============================================================ */

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

    position: absolute;

    width: 14rem;
    height: 14rem;

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

    border-radius: 50%;

    pointer-events: none;

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


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

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

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

    gap: 0.7rem;

    margin-bottom: 2.25rem;

    color: inherit;

    text-decoration: none;
}


.auth-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 180ms ease,
        box-shadow 180ms ease;
}


.auth-brand:hover .auth-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);
}


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

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

    letter-spacing: -0.025em;
}


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

.auth-header {
    position: relative;
    z-index: 2;

    margin-bottom: 2rem;
}


.auth-eyebrow {
    display: inline-flex;

    margin-bottom: 0.65rem;

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

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

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


.auth-title {
    margin: 0;

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

    font-size:
        clamp(
            2rem,
            6vw,
            2.65rem
        );

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

    letter-spacing: -0.055em;
}


.auth-description {
    max-width: 28rem;

    margin:
        0.9rem
        0
        0;

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

    font-size: 0.95rem;
    line-height: 1.7;
}


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

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

    display: grid;

    gap: 1.25rem;
}


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

.form-group {
    display: grid;

    gap: 0.55rem;
}


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

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

    letter-spacing: -0.01em;
}


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

.input-wrapper {
    position: relative;

    display: flex;
    align-items: center;
}


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

.input-icon {
    position: absolute;

    left: 1rem;

    width: 1.12rem;
    height: 1.12rem;

    pointer-events: none;

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

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


.input-wrapper:focus-within .input-icon {
    fill:
        var(
            --public-primary,
            #1f5fe0
        );

    transform: scale(1.04);
}


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

.form-input {
    width: 100%;

    min-height: 3.25rem;

    padding:
        0.9rem
        1rem
        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,
        transform 160ms ease;
}


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


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

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


.form-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)
        );
}


/* ============================================================
   Invalid Input
   Used by passkey-login.js
   ============================================================ */

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

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

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


.form-input.is-invalid + * {
    color: #b42318;
}


/* ============================================================
   Passkey Button
   ============================================================ */

.btn-passkey {
    position: relative;

    width: 100%;

    min-height: 3.35rem;

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

    gap: 0.7rem;

    padding:
        0.85rem
        1.25rem;

    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;
}


/* subtle button shine */

.btn-passkey::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;
}


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


.btn-passkey: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);
}


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


.btn-passkey: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);
}


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

    opacity: 0.7;

    transform: none;

    box-shadow:
        0 8px 20px rgba(31, 95, 224, 0.16);
}


/* ============================================================
   Passkey Button Icon
   ============================================================ */

.btn-passkey-icon {
    position: relative;
    z-index: 1;

    width: 1.25rem;
    height: 1.25rem;

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

    flex: 0 0 auto;
}


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

    fill: currentColor;
}


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

   JavaScript adds:
   .btn-passkey.is-loading
   ============================================================ */

.btn-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%;
}


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

    animation:
        passkey-spinner
        700ms
        linear
        infinite;
}


.btn-passkey.is-loading .btn-passkey-icon {
    display: none;
}


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


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


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

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

    display: none;

    margin-top: 1.15rem;

    padding:
        0.85rem
        1rem;

    border:
        1px solid
        transparent;

    border-radius: 0.9rem;

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


.auth-status:not(:empty) {
    display: block;
}


/* Information */

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

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

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


/* Success */

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

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

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


/* Error */

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

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

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


/* ============================================================
   Passkey Security Information
   ============================================================ */

.passkey-info {
    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 Info Icon
   ============================================================ */

.passkey-info-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-info-icon svg {
    width: 1rem;
    height: 1rem;

    fill: currentColor;
}


/* ============================================================
   Passkey Info Content
   ============================================================ */

.passkey-info-content {
    min-width: 0;
}


.passkey-info-content strong {
    display: block;

    margin-bottom: 0.25rem;

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

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


.passkey-info-content p {
    margin: 0;

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

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


/* ============================================================
   Register Footer
   ============================================================ */

.auth-footer {
    position: relative;
    z-index: 2;

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

    flex-wrap: wrap;

    gap: 0.35rem;

    margin-top: 1.65rem;

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

    font-size: 0.84rem;

    text-align: center;
}


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

    font-weight: 680;

    text-decoration: none;

    transition:
        color 160ms ease;
}


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

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


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

.auth-legal {
    margin:
        1.25rem
        auto
        0;

    max-width: 29rem;

    padding-inline: 0.5rem;

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

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

    text-align: center;
}


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

    font-weight: 600;

    text-decoration: none;

    transition:
        color 160ms ease;
}


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


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

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-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;
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 560px) {

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

        padding:
            1.5rem
            0.85rem
            2.5rem;
    }


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

        border-radius: 1.4rem;
    }


    .auth-brand {
        margin-bottom: 1.75rem;
    }


    .auth-title {
        font-size:
            clamp(
                1.85rem,
                9vw,
                2.3rem
            );
    }


    .auth-description {
        font-size: 0.9rem;
    }


    .passkey-info {
        padding: 0.9rem;
    }

}


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

@media (max-width: 360px) {

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


    .auth-footer {
        display: grid;

        gap: 0.2rem;
    }

}


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

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

    .auth-brand-mark,
    .form-input,
    .input-icon,
    .btn-passkey,
    .btn-passkey::before,
    .auth-footer a,
    .auth-legal a {
        transition: none;
    }


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


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

}