/* ============================================================
   Background panel kanan halaman auth.
   Diadaptasi dari hero PMB (pmb/public/assets/landing/css/hero.css).
   Warna mengikuti --bs-primary-rgb dari tema.
   ============================================================ */

.auth-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--bs-primary-rgb), .20), transparent 70%),
        linear-gradient(160deg, rgba(var(--bs-primary-rgb), .16) 0%, rgba(var(--bs-primary-rgb), .07) 55%, rgba(var(--bs-primary-rgb), .13) 100%),
        #ffffff;
    box-shadow: inset 1px 0 0 rgba(var(--bs-primary-rgb), .14);
}

.auth-hero .auth-hero-content {
    position: relative;
    z-index: 2;
}

/* grid halus */
.auth-hero .auth-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--bs-primary-rgb), .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--bs-primary-rgb), .08) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, #000 30%, transparent 100%);
    pointer-events: none;
}

/* blob gradient bergerak pelan */
.auth-hero .auth-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .6;
    pointer-events: none;
    will-change: transform;
}

.auth-hero .auth-hero-blob-1 {
    width: 480px;
    height: 480px;
    top: -140px;
    right: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(var(--bs-primary-rgb), .55), transparent 70%);
    animation: authHeroFloat1 18s ease-in-out infinite;
}

.auth-hero .auth-hero-blob-2 {
    width: 420px;
    height: 420px;
    bottom: -160px;
    left: -120px;
    background: radial-gradient(circle at 60% 40%, rgba(var(--bs-primary-rgb), .45), transparent 70%);
    animation: authHeroFloat2 22s ease-in-out infinite;
}

.auth-hero .auth-hero-blob-3 {
    width: 320px;
    height: 320px;
    top: 55%;
    left: 60%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 190, 60, .18), transparent 70%);
    animation: authHeroFloat3 26s ease-in-out infinite;
}

@keyframes authHeroFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 50px) scale(1.12); }
}

@keyframes authHeroFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, -45px) scale(1.08); }
}

@keyframes authHeroFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, -35px) scale(1.15); }
    66% { transform: translate(40px, 30px) scale(.92); }
}

/* partikel kecil */
.auth-hero .auth-hero-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .45);
    animation: authHeroDot 9s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authHeroDot {
    0%, 100% { transform: translateY(0); opacity: .25; }
    50% { transform: translateY(-26px); opacity: .8; }
}

/* ---------- logo ---------- */
.auth-logo {
    animation: authFadeDown .7s ease-out both;
}

/* card glossy untuk logo di atas form (desktop) */
.auth-logo-glossy {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.75rem;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(160deg, #ffffff 0%, rgba(var(--bs-primary-rgb), .06) 100%);
    border: 1px solid rgba(var(--bs-primary-rgb), .18);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 -6px 14px -10px rgba(var(--bs-primary-rgb), .35) inset,
        0 18px 36px -20px rgba(var(--bs-primary-rgb), .6),
        0 4px 10px -6px rgba(0, 0, 0, .08);
}

/* kilap setengah atas */
.auth-logo-glossy::before {
    content: "";
    position: absolute;
    inset: 0 0 50% 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* kilau yang menyapu pelan */
.auth-logo-glossy::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(20deg);
    animation: authLogoShine 5s ease-in-out 1s infinite;
    pointer-events: none;
}

.auth-logo-glossy img {
    position: relative;
    z-index: 1;
}

@keyframes authLogoShine {
    0% { left: -60%; }
    40%, 100% { left: 130%; }
}

.auth-logo-card {
    display: inline-flex;
    align-items: center;
    padding: .85rem 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(var(--bs-primary-rgb), .12);
    box-shadow: 0 12px 32px -18px rgba(var(--bs-primary-rgb), .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: authFadeDown .7s ease-out both;
}

@keyframes authFadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- area scene 3D ---------- */
.auth-scene-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
}

#auth-lottie {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 1 / 1;
    opacity: 0;
    transform: scale(.96);
    transition: opacity .8s ease-out, transform .8s ease-out;
}

#auth-lottie.is-ready {
    opacity: 1;
    transform: scale(1);
}

.auth-hero-img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    animation: authFadeDown .8s ease-out both;
}

.auth-scene-glow {
    position: absolute;
    top: 52%;
    left: 50%;
    width: 380px;
    height: 380px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb), .28) 0%, rgba(var(--bs-primary-rgb), .08) 45%, transparent 70%);
    pointer-events: none;
}

/* desktop: layout pas setinggi layar, animasi mengecil mengikuti sisa ruang */
@media (min-width: 992px) {
    .auth-shell {
        height: 100vh;
        overflow: hidden;
    }

    .auth-shell .auth-form-col {
        overflow-y: auto;
    }

    .auth-hero-content,
    .auth-hero-body {
        min-height: 0;
    }

    .auth-hero-body .auth-scene-wrap {
        flex: 1 1 0;
        min-height: 0;
        max-height: 560px;
    }

    /* svg lottie menyesuaikan kotak (preserveAspectRatio meet) */
    .auth-hero-body #auth-lottie {
        aspect-ratio: auto;
        height: 100%;
    }

    .auth-hero-body .auth-hero-img {
        height: 100%;
    }
}

/* ---------- nama aplikasi ---------- */
.auth-app-name {
    position: relative;
    z-index: 2;
}

.auth-app-name h1 {
    font-size: 2.25rem;
    letter-spacing: -.5px;
}

.auth-app-badge {
    display: inline-block;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
    border: 1px solid rgba(var(--bs-primary-rgb), .2);
}

.auth-app-accent {
    display: block;
    width: 48px;
    height: 4px;
    margin: 1.25rem auto 0;
    border-radius: 999px;
    background: var(--bs-primary);
}

/* ---------- input form auth ---------- */
.form-control.auth-input {
    border-color: var(--bs-primary);
}

.form-control.auth-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.form-control.auth-input.is-invalid {
    border-color: var(--bs-danger);
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero .auth-hero-blob,
    .auth-hero .auth-hero-dot,
    .auth-logo,
    .auth-logo-card,
    .auth-logo-glossy::after {
        animation: none !important;
    }
}
