﻿/* =========================================================
   V2 login page (Views/InnerPage/Login.cshtml, Template 2)
   Shell: .pio-auth > .pio-auth-card > (.pio-auth-side + .pio-auth-main)
   The login modal (_loginModalV2) does not load this file.
   ========================================================= */

.pio-auth {
    --pio-auth-blue: var(--pio-blue-color, #055386);
    --pio-auth-navy: #0a1525;
    --pio-auth-navy-2: #152847;
    --pio-auth-accent: var(--pio-primary-color, #FFA000);
    --pio-auth-ink: #0a1525;
    --pio-auth-text: #4b5563;
    --pio-auth-muted: #6b7280;
    --pio-auth-line: #e6e8ec;
    --pio-auth-card: #fff;
    --pio-auth-field: #fff;
    --pio-auth-dir: 1;
    position: relative;
    padding-block: clamp(1.5rem, 4vw, 3.5rem);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background-color: #f3f5f9;
    background-image: radial-gradient(rgba(10, 21, 37, .07) 1px, transparent 1px);
    background-size: 22px 22px;
}

html[lang="ar"] .pio-auth {
    --pio-auth-dir: -1;
}

/* login / signup: hide the site navbar with CSS only. It must stay in the DOM -
   its controller (upperSectionCtrlV2 -> upperSectionCtrl) loads the current user,
   and localizationCtrl only clears layout.processing (the full-page spinner)
   after that. The footer is already skipped for these actions
   (ExceptionShowFooterPageAction). */
body[data-action="login" i] #pio-navbar-sticky,
body[data-action="signup" i] #pio-navbar-sticky {
    display: none !important;
}

/* keep the page visible while layout.processing is true and show the local
   loader inside the card (.pio-auth-loader) instead of the full-page spinner */
body[data-action="login" i] > .spinner,
body[data-action="signup" i] > .spinner {
    display: none !important;
}

body[data-action="login" i] main.ng-hide:not(.ng-hide-animate),
body[data-action="signup" i] main.ng-hide:not(.ng-hide-animate) {
    display: block !important;
}

/* and drop main's reserve for the fixed navbar */
main:has(> .pio-auth) {
    padding-top: 0;
    padding-bottom: 0;
}

/* own mini top bar: logo + back to home */
.pio-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1080px;
    margin: 0 auto 1.25rem;
}

    .pio-auth-topbar:has(+ .is-signup) {
        max-width: 1240px;
    }

.pio-auth-logo img {
    width: auto;
    height: 44px;
}

.pio-auth-home {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border: 1px solid var(--pio-auth-line);
    border-radius: 999px;
    background: var(--pio-auth-card);
    font-size: .875rem;
    font-weight: 600;
    color: var(--pio-auth-ink);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

    .pio-auth-home:hover {
        border-color: var(--pio-auth-accent);
        color: var(--pio-auth-accent);
    }

html[lang="en"] .pio-auth-home i,
html[lang="en"] .pio-auth-home svg {
    transform: scaleX(-1);
}

body[data-bs-theme="dark"] .pio-auth {
    --pio-auth-ink: #f3f4f6;
    --pio-auth-text: rgba(255, 255, 255, .72);
    --pio-auth-muted: rgba(255, 255, 255, .5);
    --pio-auth-line: rgba(255, 255, 255, .12);
    --pio-auth-card: rgba(255, 255, 255, .03);
    --pio-auth-field: rgba(255, 255, 255, .04);
}

body[data-bs-theme="dark"] .pio-auth {
    background-color: #000;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
}

.pio-auth > .container {
    width: 100%;
}

/* ---------- Card ---------- */

.pio-auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 1080px;
    margin-inline: auto;
    overflow: hidden;
    /* clip, not hidden: hidden makes the card a scroll container and breaks the
       sticky spinner in .pio-auth-loader-box */
    overflow: clip;
    border: 1px solid var(--pio-auth-line);
    border-radius: 28px;
    background: var(--pio-auth-card);
    box-shadow: 0 40px 80px -48px rgba(10, 21, 37, .45);
    animation: pioAuthRise .6s cubic-bezier(.2, .7, .2, 1) both;
}

body[data-bs-theme="dark"] .pio-auth-card {
    box-shadow: none;
}

@keyframes pioAuthRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Side panel ---------- */

.pio-auth-side {
    position: relative;
    display: none;
    overflow: hidden;
    order: 2;
    padding: 3.5rem 3rem;
    background: linear-gradient(150deg, var(--pio-auth-navy-2) 0%, var(--pio-auth-navy) 55%);
    color: #fff;
    isolation: isolate;
}

.pio-auth-side-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.pio-auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 1.25rem;
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--pio-auth-accent);
}

html[lang="ar"] .pio-auth-eyebrow {
    letter-spacing: 0;
}

.pio-auth-eyebrow::before {
    content: "";
    width: 42px;
    height: 2px;
    background: currentColor;
}

.pio-auth-side-title {
    max-width: calc(100% - 7rem);
    margin: 0 0 1rem;
    font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    text-transform: none;
    color: #fff;
}

.pio-auth-side-text {
    max-width: min(380px, calc(100% - 7rem));
    margin: 0 0 2.25rem;
    font-size: 1rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, .75);
}

.pio-auth-points {
    display: grid;
    gap: .875rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pio-auth-point {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .75rem 1rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(6px);
    font-size: .9375rem;
    color: rgba(255, 255, 255, .88);
    opacity: 0;
    transform: translateY(12px);
    animation: pioAuthRise .55s ease forwards;
}

    .pio-auth-point:nth-child(1) {
        animation-delay: .25s;
    }

    .pio-auth-point:nth-child(2) {
        animation-delay: .4s;
    }

    .pio-auth-point:nth-child(3) {
        animation-delay: .55s;
    }

.pio-auth-point-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--pio-auth-accent);
    color: #fff;
}

.pio-auth-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
    font-size: 1.25rem;
    color: #fff;
    animation: pioAuthFloat 6s ease-in-out infinite;
}

    .pio-auth-float.is-a {
        top: -.5rem;
        inset-inline-end: 0;
    }

    .pio-auth-float.is-b {
        top: 4.25rem;
        inset-inline-end: 3.75rem;
        color: var(--pio-auth-accent);
        animation-delay: -2s;
    }

    .pio-auth-float.is-c {
        top: 8.5rem;
        inset-inline-end: .25rem;
        animation-delay: -4s;
    }

@keyframes pioAuthFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(-4deg);
    }
}

/* ---------- Form side ---------- */

.pio-auth-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 1;
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.5rem);
}

.pio-auth-pane {
    width: 100%;
    max-width: 420px;
    animation: pioAuthRise .45s ease both;
}

.pio-auth-head {
    margin-bottom: .5rem;
}

.pio-auth-title {
    margin: 0 0 .5rem;
    font-size: clamp(1.6rem, 1.25rem + 1vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    text-transform: none;
    color: var(--pio-auth-ink);
}

.pio-auth-subtitle {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.7;
    color: var(--pio-auth-muted);
}

/* tabs with a sliding pill (3 equal columns) */
.pio-auth .pio-login-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .25rem;
    padding: .25rem;
    border-radius: 14px;
}

.pio-auth .pio-login-tabs-pill {
    --i: 0;
    position: absolute;
    top: .25rem;
    bottom: .25rem;
    inset-inline-start: .25rem;
    width: calc((100% - 1rem) / 3);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(10, 21, 37, .1);
    transform: translateX(calc(var(--i) * (100% + .25rem) * var(--pio-auth-dir)));
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

body[data-bs-theme="dark"] .pio-auth .pio-login-tabs-pill {
    background: rgba(255, 255, 255, .12);
    box-shadow: none;
}

.pio-auth .pio-login-tabs[data-active="phone"] .pio-login-tabs-pill {
    --i: 1;
}

.pio-auth .pio-login-tabs[data-active="username"] .pio-login-tabs-pill {
    --i: 2;
}

.pio-auth .pio-login-tab {
    position: relative;
    z-index: 1;
    padding: .65rem .5rem;
    border-radius: 11px;
}

    .pio-auth .pio-login-tab.is-active,
    body[data-bs-theme="dark"] .pio-auth .pio-login-tab.is-active {
        background: transparent;
        box-shadow: none;
    }

.pio-auth-fields {
    animation: pioAuthFields .35s ease both;
}

    .pio-auth-fields.ng-leave,
    .pio-auth-pane.ng-leave {
        display: none !important;
    }

@keyframes pioAuthFields {
    from {
        opacity: 0;
        transform: translateX(calc(10px * var(--pio-auth-dir)));
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pio-auth .pio-signup-form .form-control,
.pio-auth .pio-signup-form .form-select {
    border-color: var(--pio-auth-line);
    border-radius: 12px;
    background-color: var(--pio-auth-field);
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .pio-auth .pio-signup-form .form-control:focus,
    .pio-auth .pio-signup-form .form-select:focus {
        border-color: var(--pio-auth-accent);
        box-shadow: 0 0 0 4px rgba(255, 160, 0, .15);
    }

.pio-auth-submit {
    height: 50px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

    .pio-auth-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px -14px rgba(255, 160, 0, .8);
    }

    .pio-auth-submit:disabled {
        opacity: .75;
    }

.pio-auth-submit-arrow {
    transition: transform .2s ease;
}

html[lang="en"] .pio-auth-submit-arrow {
    transform: scaleX(-1);
}

.pio-auth-submit:hover .pio-auth-submit-arrow {
    transform: translateX(calc(4px * var(--pio-auth-dir)));
}

html[lang="en"] .pio-auth-submit:hover .pio-auth-submit-arrow {
    transform: scaleX(-1) translateX(-4px);
}

.pio-auth-switch {
    margin: .5rem 0 0;
    text-align: center;
    font-size: .875rem;
    color: var(--pio-auth-muted);
}

    .pio-auth-switch a {
        margin-inline-start: .25rem;
        font-weight: 700;
        color: var(--pio-auth-accent);
        text-decoration: none;
    }

        .pio-auth-switch a:hover {
            text-decoration: underline;
        }

/* ---------- Responsive ---------- */

@media (min-width: 992px) {
    .pio-auth-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        min-height: 620px;
    }

    .pio-auth-side {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .pio-auth-card {
        border-radius: 20px;
    }

    .pio-auth .pio-login-tab {
        padding-inline: .25rem;
        font-size: .75rem;
    }

        .pio-auth .pio-login-tab i,
        .pio-auth .pio-login-tab svg {
            display: none;
        }
}

@media (prefers-reduced-motion: reduce) {
    .pio-auth *,
    .pio-auth *::before {
        animation: none !important;
        transition: none !important;
    }

    .pio-auth-point {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   V2 signup page (Views/InnerPage/Signup.cshtml, Template 2)
   Same shell as login; .pio-auth-card.is-signup gives the form more room.
   ========================================================= */

.pio-auth-card.is-signup {
    max-width: 1240px;
}

.is-signup .pio-auth-main {
    align-items: flex-start;
}

.is-signup .pio-auth-pane {
    max-width: 680px;
}

    .is-signup .pio-auth-pane.is-narrow {
        max-width: 440px;
        align-self: center;
    }

@media (min-width: 992px) {
    .pio-auth-card.is-signup {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); /* form | side */
    }

    .is-signup .pio-auth-main {
        order: 1;
    }
}

/* stepper */
.pio-auth-stepper {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--pio-auth-muted);
}

    .pio-auth-stepper li {
        display: flex;
        align-items: center;
        gap: .5rem;
    }

        .pio-auth-stepper li + li::before {
            content: "";
            width: 36px;
            height: 2px;
            margin-inline-end: .25rem;
            border-radius: 2px;
            background: var(--pio-auth-line);
        }

        .pio-auth-stepper li.is-active,
        .pio-auth-stepper li.is-done {
            color: var(--pio-auth-ink);
        }

            .pio-auth-stepper li.is-active + li::before,
            .pio-auth-stepper li.is-done + li::before {
                background: var(--pio-auth-accent);
            }

.pio-auth-stepper-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--pio-auth-line);
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
}

.pio-auth-stepper li.is-active .pio-auth-stepper-dot {
    border-color: var(--pio-auth-accent);
    background: var(--pio-auth-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 160, 0, .18);
}

.pio-auth-stepper li.is-done .pio-auth-stepper-dot {
    border-color: var(--pio-auth-accent);
    color: var(--pio-auth-accent);
}

/* section labels inside the form */
.pio-auth-section {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .75rem 0 0;
    padding-bottom: .5rem;
    border-bottom: 1px dashed var(--pio-auth-line);
    font-size: .875rem;
    font-weight: 700;
    color: var(--pio-auth-ink);
}

    .pio-auth-section i,
    .pio-auth-section svg {
        box-sizing: content-box;
        width: 14px;
        height: 14px;
        padding: 7px;
        border-radius: 8px;
        background: rgba(10, 21, 37, .06);
        font-size: 14px;
        color: var(--pio-auth-ink);
    }

body[data-bs-theme="dark"] .pio-auth-section i,
body[data-bs-theme="dark"] .pio-auth-section svg {
    background: rgba(255, 255, 255, .08);
}

.pio-auth-hint {
    display: block;
    margin-top: .4rem;
    font-size: .75rem;
    line-height: 1.6;
    color: var(--pio-auth-muted);
}

/* input with a leading icon */
.pio-auth-input-icon {
    position: relative;
}

    .pio-auth-input-icon > i,
    .pio-auth-input-icon > svg {
        position: absolute;
        top: 50%;
        inset-inline-start: 1rem;
        transform: translateY(-50%);
        font-size: .9rem;
        color: var(--pio-auth-muted);
        pointer-events: none;
        transition: color .2s ease;
    }

/* physical padding so dir="ltr" inputs (username, email) still clear the icon */
.pio-auth .pio-auth-input-icon > .form-control {
    padding-left: 2.6rem;
}

html[lang="ar"] .pio-auth .pio-auth-input-icon > .form-control {
    padding-left: .75rem;
    padding-right: 2.6rem;
}

.pio-auth-input-icon:focus-within > i,
.pio-auth-input-icon:focus-within > svg {
    color: var(--pio-auth-accent);
}

/* gender choice chips */
.pio-auth-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    max-width: 420px;
}

.pio-auth-choice {
    position: relative;
    margin: 0;
    cursor: pointer;
}

    .pio-auth-choice .form-check-input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .pio-auth-choice > span {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        height: 46px;
        border: 1px solid var(--pio-auth-line);
        border-radius: 12px;
        background: var(--pio-auth-field);
        font-size: .875rem;
        font-weight: 600;
        color: var(--pio-auth-text);
        transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
    }

    .pio-auth-choice:hover > span {
        border-color: rgba(255, 160, 0, .6);
    }

    .pio-auth-choice .form-check-input:checked + span {
        border-color: var(--pio-auth-accent);
        background: rgba(255, 160, 0, .1);
        color: var(--pio-auth-ink);
        box-shadow: 0 0 0 3px rgba(255, 160, 0, .15);
    }

        .pio-auth-choice .form-check-input:checked + span i,
        .pio-auth-choice .form-check-input:checked + span svg {
            color: var(--pio-auth-accent);
        }

    .pio-auth-choice .form-check-input:focus-visible + span {
        box-shadow: 0 0 0 4px rgba(255, 160, 0, .25);
    }

.was-validated .pio-auth-choice .form-check-input:invalid + span {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

/* subjects dropdown looks like the other fields */
.pio-auth .subjects-dropdown > .btn {
    height: 46px;
    padding-inline: .75rem;
    border: 1px solid var(--pio-auth-line);
    border-radius: 12px;
    background: var(--pio-auth-field);
    font-size: .875rem;
    font-weight: 400;
    color: var(--pio-auth-text);
}

    .pio-auth .subjects-dropdown > .btn:focus-visible,
    .pio-auth .subjects-dropdown > .btn.show {
        border-color: var(--pio-auth-accent);
        box-shadow: 0 0 0 4px rgba(255, 160, 0, .15);
    }

    .pio-auth .subjects-dropdown > .btn i,
    .pio-auth .subjects-dropdown > .btn svg {
        transition: transform .2s ease;
    }

    .pio-auth .subjects-dropdown > .btn.show i,
    .pio-auth .subjects-dropdown > .btn.show svg {
        transform: rotate(180deg);
    }

.pio-auth .subjects-dropdown .dropdown-menu {
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--pio-auth-line);
    border-radius: 14px;
    box-shadow: 0 24px 48px -24px rgba(10, 21, 37, .35);
    font-size: .875rem;
}

.pio-auth .subjects-dropdown .sign-subject-item {
    border-radius: 10px;
    white-space: normal;
}

.pio-auth .subjects-dropdown .form-check-input {
    width: 1.25em;
    height: 1.25em;
}

    .pio-auth .subjects-dropdown .form-check-input:checked {
        border-color: var(--pio-auth-accent);
        background-color: var(--pio-auth-accent);
    }

.pio-auth-count {
    display: inline-flex;
    align-items: center;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: rgba(255, 160, 0, .15);
    font-size: .75rem;
    font-weight: 700;
    color: var(--pio-auth-accent);
}

/* password rules checklist (shown while the password field is focused) */
.pio-auth-pwd-rules {
    display: grid;
    gap: .3rem;
    margin: .6rem 0 0;
    padding: .75rem .9rem;
    border: 1px solid var(--pio-auth-line);
    border-radius: 12px;
    background: var(--pio-auth-field);
    font-size: .75rem;
    animation: pioAuthRise .25s ease both;
}

    .pio-auth-pwd-rules li {
        display: flex;
        align-items: center;
        gap: .5rem;
        transition: color .2s ease;
    }

        .pio-auth-pwd-rules li.is-ok {
            color: #16a34a;
        }

        .pio-auth-pwd-rules li.is-bad {
            color: var(--pio-auth-muted);
        }

/* verification step */
.pio-auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 20px;
    background: rgba(255, 160, 0, .12);
    font-size: 1.6rem;
    color: var(--pio-auth-accent);
    animation: pioAuthFloat 6s ease-in-out infinite;
}

.pio-auth-target {
    display: block;
    margin-top: .35rem;
    font-weight: 700;
    color: var(--pio-auth-ink);
    word-break: break-all;
}

.pio-auth-otp {
    display: flex;
    justify-content: center;
    gap: .75rem;
}

    .pio-auth-otp .form-control {
        width: 58px;
        height: 64px;
        padding: 0;
        border-radius: 14px;
        text-align: center;
        font-size: 1.5rem;
        font-weight: 700;
    }

@media (max-width: 575.98px) {
    .pio-auth-stepper li + li::before {
        width: 18px;
    }

    .pio-auth-otp .form-control {
        width: 52px;
        height: 58px;
    }
}

/* ---------- signup side panel (orbit + journey) ---------- */

/* three blocks: orbit (top), copy (middle), journey (bottom) */
.is-signup-side .pio-auth-side-inner {
    justify-content: space-between;
    gap: 2rem;
}

.is-signup-side .pio-auth-side-copy {
    display: flex;
    flex-direction: column;
}

.is-signup-side .pio-auth-side-title,
.is-signup-side .pio-auth-side-text {
    max-width: none;
}

.is-signup-side .pio-auth-side-text {
    margin-bottom: 1.75rem;
}

.pio-auth-orbit {
    --orbit-size: 200px;
    position: relative;
    width: var(--orbit-size);
    height: var(--orbit-size);
    margin-inline: auto;
    flex: 0 0 auto;
}

.pio-auth-orbit-ring {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 50%;
    animation: pioAuthSpin 40s linear infinite;
}

    .pio-auth-orbit-ring.is-inner {
        inset: 42px;
        border-style: solid;
        border-color: rgba(255, 160, 0, .25);
        animation-duration: 26s;
        animation-direction: reverse;
    }

.pio-auth-orbit-item {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -22px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(21, 40, 71, .9);
    backdrop-filter: blur(6px);
    font-size: 1rem;
    color: #fff;
    /* counter-rotate so the icon stays upright while the ring spins */
    animation: pioAuthSpin 40s linear infinite reverse;
}

    .pio-auth-orbit-item.is-top {
        top: 0;
        left: 50%;
        color: var(--pio-auth-accent);
    }

    .pio-auth-orbit-item.is-bottom {
        top: 100%;
        left: 50%;
    }

    .pio-auth-orbit-item.is-side {
        top: 50%;
        left: 100%;
        width: 38px;
        height: 38px;
        margin: -19px;
        border-radius: 50%;
        font-size: .875rem;
        animation-duration: 26s;
        animation-direction: normal;
    }

/* centre: our emblem on its own (no disc), with a soft orange glow */
.pio-auth-orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: -38px;
    animation: pioAuthPulse 3.2s ease-in-out infinite;
}

/* logo-light.png is emblem + wordmark (236x72); clip it to the square
   emblem on its left */
.pio-auth-orbit-logo {
    display: block;
    width: 64px;
    height: 64px;
    overflow: hidden;
    direction: ltr;
}

    .pio-auth-orbit-logo img {
        display: block;
        width: auto;
        max-width: none;
        height: 64px;
    }

@keyframes pioAuthSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pioAuthPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 160, 0, .35));
    }

    50% {
        filter: drop-shadow(0 0 22px rgba(255, 160, 0, .6));
    }
}

/* journey card */
.pio-auth-journey {
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(6px);
}

.pio-auth-journey-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    font-size: .8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .7);
}

    .pio-auth-journey-title i,
    .pio-auth-journey-title svg {
        color: var(--pio-auth-accent);
    }

.pio-auth-journey-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

    .pio-auth-journey-steps li {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .5rem;
        text-align: center;
        font-size: .75rem;
        color: rgba(255, 255, 255, .55);
    }

        /* connector line between the dots */
        .pio-auth-journey-steps li + li::before {
            content: "";
            position: absolute;
            top: 15px;
            right: 50%;
            left: -50%;
            height: 2px;
            margin-inline: 22px;
            border-radius: 2px;
            background: rgba(255, 255, 255, .12);
        }

html[lang="ar"] .pio-auth-journey-steps li + li::before {
    right: -50%;
    left: 50%;
}

.pio-auth-journey-steps li.is-done + li::before {
    background: var(--pio-auth-accent);
}

.pio-auth-journey-dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: var(--pio-auth-navy);
    font-weight: 700;
    color: rgba(255, 255, 255, .7);
    transition: all .3s ease;
}

.pio-auth-journey-steps li.is-active {
    color: #fff;
}

    .pio-auth-journey-steps li.is-active .pio-auth-journey-dot {
        border-color: var(--pio-auth-accent);
        background: var(--pio-auth-accent);
        color: #fff;
        box-shadow: 0 0 0 5px rgba(255, 160, 0, .18);
    }

.pio-auth-journey-steps li.is-done {
    color: rgba(255, 255, 255, .85);
}

    .pio-auth-journey-steps li.is-done .pio-auth-journey-dot {
        border-color: var(--pio-auth-accent);
        color: var(--pio-auth-accent);
    }

@media (prefers-reduced-motion: reduce) {
    .pio-auth-orbit-ring,
    .pio-auth-orbit-item,
    .pio-auth-orbit-core {
        animation: none !important;
    }
}

/* ---------- local loader over the form side (bound to layout.processing) ---------- */

.pio-auth-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
}

    .pio-auth-loader.is-on {
        opacity: 1;
        visibility: visible;
        transition: opacity .25s ease, visibility 0s;
    }

body[data-bs-theme="dark"] .pio-auth-loader {
    background: rgba(0, 0, 0, .7);
}

/* sticky so the spinner stays in view on the long signup form
   (the user is usually scrolled down to the Next button) */
.pio-auth-loader-box {
    position: sticky;
    top: 40vh;
    bottom: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pio-auth-spinner {
    position: relative;
    width: 56px;
    height: 56px;
}

    .pio-auth-spinner::before,
    .pio-auth-spinner::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
    }

    /* track */
    .pio-auth-spinner::before {
        border: 4px solid rgba(255, 160, 0, .18);
    }

    /* moving arc */
    .pio-auth-spinner::after {
        border: 4px solid transparent;
        border-top-color: var(--pio-auth-accent);
        border-right-color: var(--pio-auth-accent);
        animation: pioAuthSpin .8s linear infinite;
    }

.pio-auth-loader-text {
    font-size: .875rem;
    font-weight: 600;
    color: var(--pio-auth-muted);
}

@media (prefers-reduced-motion: reduce) {
    .pio-auth-spinner::after {
        animation-duration: 1.6s !important;
    }
}

/* ---------- birthday picker (Eonasdan bootstrap-datetimepicker v4, already in
   Content/plugins) restyled for Bootstrap 5 and this card ---------- */

.pio-auth .pio-auth-date {
    position: relative;
}

    .pio-auth .pio-auth-date .form-control {
        cursor: pointer;
        background-color: var(--pio-auth-field);
    }

.pio-auth .bootstrap-datetimepicker-widget.dropdown-menu {
    display: block;
    width: 300px;
    margin: 6px 0;
    padding: .75rem;
    border: 1px solid var(--pio-auth-line);
    border-radius: 16px;
    background: var(--pio-auth-card);
    box-shadow: 0 24px 48px -20px rgba(10, 21, 37, .35);
    font-size: .8125rem;
    color: var(--pio-auth-ink);
    z-index: 30;
}

body[data-bs-theme="dark"] .pio-auth .bootstrap-datetimepicker-widget.dropdown-menu {
    background: #111;
}

/* the plugin draws little arrows for Bootstrap 3 - not needed here */
.pio-auth .bootstrap-datetimepicker-widget.dropdown-menu::before,
.pio-auth .bootstrap-datetimepicker-widget.dropdown-menu::after {
    display: none;
}

.pio-auth .bootstrap-datetimepicker-widget table {
    width: 100%;
    margin: 0;
}

    .pio-auth .bootstrap-datetimepicker-widget table th,
    .pio-auth .bootstrap-datetimepicker-widget table td {
        height: 36px;
        padding: 0;
        border: 0;
        border-radius: 10px;
        text-align: center;
        line-height: 36px;
    }

        .pio-auth .bootstrap-datetimepicker-widget table th.picker-switch {
            font-weight: 700;
        }

        .pio-auth .bootstrap-datetimepicker-widget table th.dow {
            font-size: .75rem;
            font-weight: 600;
            color: var(--pio-auth-muted);
        }

        .pio-auth .bootstrap-datetimepicker-widget table th.prev,
        .pio-auth .bootstrap-datetimepicker-widget table th.next,
        .pio-auth .bootstrap-datetimepicker-widget table th.picker-switch,
        .pio-auth .bootstrap-datetimepicker-widget table td.day,
        .pio-auth .bootstrap-datetimepicker-widget table td span {
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease;
        }

            .pio-auth .bootstrap-datetimepicker-widget table th.prev:hover,
            .pio-auth .bootstrap-datetimepicker-widget table th.next:hover,
            .pio-auth .bootstrap-datetimepicker-widget table th.picker-switch:hover,
            .pio-auth .bootstrap-datetimepicker-widget table td.day:hover,
            .pio-auth .bootstrap-datetimepicker-widget table td span:hover {
                background: rgba(255, 160, 0, .12);
            }

        .pio-auth .bootstrap-datetimepicker-widget table td.old,
        .pio-auth .bootstrap-datetimepicker-widget table td.new {
            color: var(--pio-auth-muted);
            opacity: .55;
        }

        .pio-auth .bootstrap-datetimepicker-widget table td.today::before {
            border-bottom-color: var(--pio-auth-accent);
        }

        .pio-auth .bootstrap-datetimepicker-widget table td.active,
        .pio-auth .bootstrap-datetimepicker-widget table td.active:hover,
        .pio-auth .bootstrap-datetimepicker-widget table td span.active {
            background: var(--pio-auth-accent);
            color: #fff;
            text-shadow: none;
        }

        .pio-auth .bootstrap-datetimepicker-widget table td.disabled,
        .pio-auth .bootstrap-datetimepicker-widget table td span.disabled {
            background: none;
            color: var(--pio-auth-muted);
            opacity: .35;
            cursor: not-allowed;
        }

        /* month / year / decade grids */
        .pio-auth .bootstrap-datetimepicker-widget table td span {
            display: inline-block;
            width: 31%;
            height: 44px;
            margin: 1%;
            border-radius: 10px;
            line-height: 44px;
        }

.pio-auth .bootstrap-datetimepicker-widget .picker-switch.accordion-toggle,
.pio-auth .bootstrap-datetimepicker-widget .list-unstyled {
    margin: 0;
}
