/* Auth pages — login & role selection */



:root {

    --auth-primary: #5b4b8a;

    --auth-primary-dark: #3d3161;

    --auth-accent: #e8788a;

    --auth-mint: #6ee7b7;

    --auth-gold: #fbbf24;

    --auth-surface: rgba(255, 255, 255, 0.92);

    --auth-border: rgba(91, 75, 138, 0.12);

}



.auth-body {

    margin: 0;

    min-height: 100vh;

    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;

    color: #1f2937;

    position: relative;

    overflow-x: hidden;

}



/* Decorative background */

.auth-bg {

    position: fixed;

    inset: 0;

    z-index: 0;

    background: linear-gradient(145deg, #f3f0fa 0%, #faf8fc 35%, #fdeef1 100%);

    pointer-events: none;

}



.auth-bg-pattern {

    position: absolute;

    inset: 0;

    opacity: 0.45;

    background-image:

        radial-gradient(circle at 20% 20%, rgba(91, 75, 138, 0.08) 0 2px, transparent 2px),

        radial-gradient(circle at 80% 60%, rgba(232, 120, 138, 0.06) 0 2px, transparent 2px);

    background-size: 28px 28px, 36px 36px;

}



.auth-bg-orb {

    position: absolute;

    border-radius: 50%;

    filter: blur(60px);

    animation: authFloat 12s ease-in-out infinite;

}



.auth-bg-orb--1 {

    width: 280px;

    height: 280px;

    background: rgba(91, 75, 138, 0.18);

    top: -60px;

    right: -40px;

}



.auth-bg-orb--2 {

    width: 220px;

    height: 220px;

    background: rgba(232, 120, 138, 0.2);

    bottom: 10%;

    left: -50px;

    animation-delay: -4s;

}



.auth-bg-orb--3 {

    width: 160px;

    height: 160px;

    background: rgba(110, 231, 183, 0.15);

    top: 45%;

    right: 15%;

    animation-delay: -8s;

}



@keyframes authFloat {

    0%, 100% { transform: translate(0, 0) scale(1); }

    50% { transform: translate(12px, -16px) scale(1.05); }

}



.auth-topbar {

    position: relative;

    z-index: 10;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 1rem 1.25rem;

    padding-top: calc(1rem + env(safe-area-inset-top, 0px));

}



.auth-brand {

    display: flex;

    align-items: center;

    gap: 10px;

    text-decoration: none;

    color: var(--auth-primary-dark);

    font-weight: 700;

    font-size: 1.1rem;

}



.auth-brand img {

    border-radius: 50%;

    border: 2px solid rgba(91, 75, 138, 0.2);

    object-fit: cover;

}



.auth-topbar-spacer {
    width: 40px;
}

.auth-topbar-link {

    font-size: 0.875rem;

    font-weight: 600;

    color: var(--auth-primary);

    text-decoration: none;

    padding: 0.45rem 0.85rem;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.7);

    border: 1px solid var(--auth-border);

    backdrop-filter: blur(8px);

    transition: background 0.15s, border-color 0.15s, transform 0.15s;

}

.auth-topbar-link:hover {
    background: #fff;
    border-color: rgba(91, 75, 138, 0.22);
    color: var(--auth-primary-dark);
}



.auth-shell {

    position: relative;

    z-index: 1;

    max-width: 1080px;

    margin: 0 auto;

    padding: 0 1.25rem 2.5rem;

    min-height: calc(100vh - 72px);

    display: flex;

    align-items: center;

}



/* ── Login — centered portal layout ── */

.auth-variant-login .auth-shell,
.auth-variant-register .auth-shell {
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
}

.auth-login-center {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.auth-login-brand-block {
    text-align: center;
}

.auth-login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
    box-shadow: 0 12px 28px rgba(91, 75, 138, 0.22);
}

.auth-login-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #fff;
}

.auth-login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-primary-dark);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.auth-login-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.auth-card--login {
    width: 100%;
    padding: 1.75rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.auth-field .auth-input-wrap .form-control {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 2.85rem;
    padding-right: 1rem;
}

.auth-field .auth-input-wrap .form-control.has-toggle {
    padding-right: 2.85rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: rgba(91, 75, 138, 0.08);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit i {
    font-size: 1.25rem;
    transition: transform 0.15s;
}

.auth-submit:hover i {
    transform: translateX(2px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(91, 75, 138, 0.12);
}

.auth-login-trust {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

.auth-login-trust i {
    font-size: 1rem;
    color: var(--auth-primary);
    opacity: 0.7;
}

/* Legacy split layout (unused) */

.auth-login-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 2.5rem;

    align-items: center;

    width: 100%;

}



.auth-hero-panel {

    padding: 1rem 0;

}



.auth-quest-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    font-size: 0.75rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.06em;

    color: var(--auth-primary);

    background: rgba(91, 75, 138, 0.1);

    border: 1px solid rgba(91, 75, 138, 0.15);

    border-radius: 999px;

    padding: 0.35rem 0.85rem;

    margin-bottom: 1rem;

}



.auth-hero-panel h1 {

    font-size: 2.25rem;

    font-weight: 700;

    line-height: 1.15;

    color: var(--auth-primary-dark);

    margin: 0 0 1rem;

}



.auth-hero-panel p {

    color: #6b7280;

    font-size: 1.05rem;

    line-height: 1.6;

    margin-bottom: 1.75rem;

}



.auth-perks {

    list-style: none;

    padding: 0;

    margin: 0;

    display: flex;

    flex-direction: column;

    gap: 0.85rem;

}



.auth-perks li {

    display: flex;

    align-items: center;

    gap: 12px;

    font-weight: 500;

    color: #374151;

}



.auth-perk-icon {

    width: 40px;

    height: 40px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.25rem;

    flex-shrink: 0;

}



.auth-perk-icon--purple { background: rgba(91, 75, 138, 0.12); color: var(--auth-primary); }

.auth-perk-icon--pink { background: rgba(232, 120, 138, 0.15); color: #db5f73; }

.auth-perk-icon--mint { background: rgba(16, 185, 129, 0.12); color: #059669; }

.auth-login-steps {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.auth-login-step {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(91, 75, 138, 0.08);
}

.auth-login-step-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-login-step strong {
    display: block;
    font-size: 0.84rem;
    color: var(--auth-primary-dark);
    margin-bottom: 0.08rem;
}

.auth-login-step span {
    display: block;
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.35;
}

.auth-card {

    background: var(--auth-surface);

    border: 1px solid var(--auth-border);

    border-radius: 24px;

    padding: 2rem;

    box-shadow:

        0 4px 6px rgba(91, 75, 138, 0.04),

        0 24px 48px rgba(91, 75, 138, 0.1);

    backdrop-filter: blur(12px);

}



.auth-card-head {

    text-align: center;

    margin-bottom: 1.5rem;

}



.auth-card-avatar {

    width: 56px;

    height: 56px;

    border-radius: 50%;

    margin: 0 auto 1rem;

    background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));

    display: flex;

    align-items: center;

    justify-content: center;

    color: #fff;

    font-size: 1.5rem;

    box-shadow: 0 8px 20px rgba(91, 75, 138, 0.25);

}



.auth-card-head h2 {

    font-size: 1.35rem;

    font-weight: 700;

    color: var(--auth-primary-dark);

    margin: 0 0 0.35rem;

}



.auth-card-head p {

    font-size: 0.9rem;

    color: #6b7280;

    margin: 0;

}



.auth-field {

    margin-bottom: 1.1rem;

}



.auth-field label {

    display: block;

    font-size: 0.8rem;

    font-weight: 600;

    color: #374151;

    margin-bottom: 0.4rem;

}



.auth-field .form-control {

    border-radius: 14px;

    border: 1.5px solid #e5e7eb;

    padding: 0.75rem 1rem;

    font-size: 16px;

    background: #fff;

    transition: border-color 0.15s, box-shadow 0.15s;

}



.auth-field .form-control:focus {

    border-color: var(--auth-primary);

    box-shadow: 0 0 0 4px rgba(91, 75, 138, 0.12);

}



.auth-submit {

    width: 100%;

    padding: 0.9rem 1.5rem;

    font-size: 1rem;

    font-weight: 600;

    color: #fff;

    border: none;

    border-radius: 14px;

    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);

    box-shadow: 0 8px 24px rgba(91, 75, 138, 0.3);

    margin-top: 0.5rem;

    cursor: pointer;

    transition: transform 0.15s, box-shadow 0.15s;

}



.auth-submit:hover {

    transform: translateY(-1px);

    box-shadow: 0 12px 28px rgba(91, 75, 138, 0.35);

    color: #fff;

}



.auth-card-foot {

    text-align: center;

    margin-top: 1.25rem;

    font-size: 0.875rem;

    color: #6b7280;

}



.auth-card-foot a {

    color: var(--auth-primary);

    font-weight: 600;

    text-decoration: none;

}

.auth-card-foot--secondary a {
    font-weight: 500;
    color: #9ca3af;
}

.auth-card-foot--secondary a:hover {
    color: #6b7280;
}



/* ── Register / role picker ── */

.auth-register-wrap {

    width: 100%;

    max-width: 720px;

    margin: 0 auto;

}



.auth-register-intro {

    text-align: center;

    margin-bottom: 2rem;

}



.auth-register-intro h1 {

    font-size: 2rem;

    font-weight: 700;

    color: var(--auth-primary-dark);

    margin: 0 0 0.5rem;

}



.auth-register-intro p {

    color: #6b7280;

    margin: 0 0 1.25rem;

    font-size: 1rem;

}



.auth-journey-track {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 0;

    max-width: 320px;

    margin: 0 auto;

}



.auth-journey-step {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 6px;

    flex: 1;

    position: relative;

}



.auth-journey-dot {

    width: 36px;

    height: 36px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.8rem;

    font-weight: 700;

    background: #fff;

    border: 2px solid #e5e7eb;

    color: #9ca3af;

    position: relative;

    z-index: 1;

}



.auth-journey-step.is-active .auth-journey-dot {

    background: var(--auth-primary);

    border-color: var(--auth-primary);

    color: #fff;

}



.auth-journey-step.is-done .auth-journey-dot {

    background: #f3f4f6;

    border-color: #d1d5db;

    color: #6b7280;

}



.auth-journey-label {

    font-size: 0.65rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.04em;

    color: #9ca3af;

}



.auth-journey-step.is-active .auth-journey-label { color: var(--auth-primary); }



.auth-journey-step:not(:last-child)::after {

    content: '';

    position: absolute;

    top: 18px;

    left: calc(50% + 18px);

    width: calc(100% - 36px);

    height: 2px;

    background: #e5e7eb;

    z-index: 0;

}



.auth-journey-step.is-done:not(:last-child)::after {

    background: #d1d5db;

}



.auth-role-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1.25rem;

}



.auth-role-card {

    display: flex;

    flex-direction: column;

    padding: 1.5rem;

    border-radius: 16px;

    text-decoration: none;

    color: inherit;

    background: #fff;

    border: 1px solid #e5e7eb;

    transition: border-color 0.15s, background 0.15s;

}



.auth-role-card:hover {

    border-color: #d1d5db;

    background: #fafafa;

    color: inherit;

}



.auth-role-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.auth-role-icon {

    width: 40px;

    height: 40px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.25rem;

    flex-shrink: 0;

    background: #f3f4f6;

    color: var(--auth-primary-dark);

}



.auth-role-card h2 {

    font-size: 1.15rem;

    font-weight: 700;

    color: var(--auth-primary-dark);

    margin: 0;

    line-height: 1.3;

    flex: 1;

    min-width: 0;

}



.auth-role-card p {

    font-size: 0.875rem;

    color: #6b7280;

    line-height: 1.5;

    margin: 0 0 1.25rem;

    flex: 1;

    position: relative;

    z-index: 1;

}



.auth-role-features {

    list-style: none;

    padding: 0;

    margin: 0 0 1.25rem;

    display: flex;

    flex-direction: column;

    gap: 0.35rem;

}



.auth-role-features li {

    font-size: 0.8rem;

    color: #6b7280;

    padding-left: 1.1rem;

    position: relative;

}



.auth-role-features li::before {

    content: '';

    position: absolute;

    left: 0;

    top: 0.55em;

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: #d1d5db;

}



.auth-role-cta {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 0.7rem 1rem;

    border-radius: 10px;

    font-weight: 600;

    font-size: 0.875rem;

    margin-top: auto;

    background: var(--auth-primary-dark);

    color: #fff;

}



.auth-role-card:hover .auth-role-cta {

    background: var(--auth-primary);

}



.auth-register-foot {

    text-align: center;

    margin: 1.5rem 0 0;

    font-size: 0.875rem;

    color: #6b7280;

}



.auth-register-foot a {

    color: var(--auth-primary);

    font-weight: 600;

    text-decoration: none;

}



/* Mobile */

@media (max-width: 767px) {

    .auth-shell {

        align-items: flex-start;

        padding-top: 0.5rem;

        min-height: auto;

    }

    .auth-variant-login .auth-shell,
    .auth-variant-register .auth-shell {
        align-items: center;
        padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-login-center,
    .auth-register-wrap {
        max-width: 100%;
        width: 100%;
    }

    .auth-register-intro {
        margin-bottom: 1.25rem;
    }

    .auth-role-card {
        padding: 1.15rem;
    }

    .auth-role-head h2 {
        font-size: 1.05rem;
    }

    .auth-login-title {
        font-size: 1.5rem;
    }

    .auth-login-logo {
        width: 64px;
        height: 64px;
    }

    .auth-card--login {
        padding: 1.35rem;
        border-radius: 20px;
    }

    .auth-bg-orb {
        opacity: 0.65;
    }

    .auth-login-grid {

        grid-template-columns: 1fr;

        gap: 1.5rem;

    }



    .auth-hero-panel {

        text-align: center;

        padding: 0;

    }



    .auth-hero-panel h1 {

        font-size: 1.65rem;

    }



    .auth-perks {

        display: none;

    }



    .auth-card {

        padding: 1.5rem;

        border-radius: 20px;

    }



    .auth-role-grid {

        grid-template-columns: 1fr;

    }



    .auth-register-intro h1 {

        font-size: 1.5rem;

    }

}



@media (min-width: 768px) {

    .auth-variant-login .auth-card--login {
        padding: 2rem 2rem 1.75rem;
    }

    .auth-login-title {
        font-size: 2rem;
    }
}

@media (hover: none) {

    .auth-submit:hover,

    .auth-role-card:hover {

        transform: none;

    }

    .auth-submit:hover i {
        transform: none;
    }

}

