/* ==========================================================================
   AUTOMOBILE - Auth (Register & Login) Stylesheet
   Crafted with ultra-fidelity to match the mobile & responsive reference
   ========================================================================== */

:root {
    --auth-bg-dark: #040d18;
    --card-glass: rgba(10, 26, 48, 0.58);
    --card-border: rgba(130, 190, 255, 0.28);
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-bg-focus: rgba(255, 255, 255, 0.13);
    --input-border: rgba(255, 255, 255, 0.16);
    --input-border-focus: #38bdf8;
    
    --gold-100: #fef3d6;
    --gold-300: #fae09c;
    --gold-500: #e5b052;
    --gold-600: #c98e2b;
    --gold-gradient: linear-gradient(135deg, #fae09c 0%, #eab85b 52%, #cf9330 100%);
    --gold-glow: 0 8px 24px rgba(234, 184, 91, 0.35);

    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.75);
    --text-dark: #081728;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    background-color: var(--auth-bg-dark);
}

body.auth-page {
    font-family: var(--font-main);
    background-color: var(--auth-bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Outer layout wrapper */
.auth-wrapper {
    width: 100%;
    max-width: 480px; /* Exact mobile form-factor matching reference */
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    body.auth-page {
        background: radial-gradient(circle at 50% 20%, #0d2238 0%, #030810 100%);
        padding: 24px 0;
    }
    .auth-wrapper {
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
    }
}

/* Background image with black SUV, showroom, and sunset skyline */
.auth-bg-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.auth-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.auth-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(4, 13, 24, 0.72) 0%, 
        rgba(4, 13, 24, 0.45) 35%, 
        rgba(4, 13, 24, 0.6) 70%, 
        rgba(4, 13, 24, 0.88) 100%
    );
    pointer-events: none;
}

/* Main Content Layer */
.auth-content {
    position: relative;
    z-index: 2;
    padding: 32px 18px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Top Branding Header */
.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 12px;
    transition: transform 0.2s ease;
}
.auth-logo-link:hover {
    transform: scale(1.02);
}

.auth-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.auth-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8cc4f5;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.auth-title {
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-white);
    margin-bottom: 8px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
}

.auth-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
    max-width: 320px;
    margin-bottom: 12px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.auth-gold-bar {
    width: 34px;
    height: 3.5px;
    background: var(--gold-gradient);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(234, 184, 91, 0.4);
}

/* Glassmorphic Form Card */
.auth-card {
    width: 100%;
    background: var(--card-glass);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 22px 18px 24px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    margin-bottom: 18px;
}

/* Alert Notification */
.auth-alert-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-alert-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Form Groups & Inputs */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.input-pill-wrap {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.input-pill-wrap:focus-within {
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.input-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(8, 20, 36, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}
.input-icon-box svg {
    width: 17px;
    height: 17px;
}

.input-fields-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.input-label-mini {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.15;
    margin-bottom: 1px;
}

.input-text-clean {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.78rem;
    line-height: 1.3;
}
.input-text-clean::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Password Toggle Icon */
.btn-eye-toggle {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease;
}
.btn-eye-toggle:hover {
    color: #ffffff;
}
.btn-eye-toggle svg {
    width: 18px;
    height: 18px;
}

/* Captcha Layout */
.captcha-row-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-input-side {
    flex: 1;
}

.captcha-display-side {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.captcha-badge-box {
    background: #ffffff;
    color: #0b1a2d;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    padding: 7px 12px;
    border-radius: 9px;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.15);
}

.btn-captcha-refresh {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-captcha-refresh:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(45deg);
}
.btn-captcha-refresh svg {
    width: 16px;
    height: 16px;
}

/* Terms & Conditions Checkbox */
.terms-agreement-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
}

.custom-checkbox-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0284c7;
    cursor: pointer;
}

.gold-link {
    color: var(--gold-300);
    text-decoration: underline;
    font-weight: 600;
}
.gold-link:hover {
    color: #ffffff;
}

/* Forgot Password link on Login */
.forgot-pass-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
    margin-bottom: 4px;
}
.forgot-pass-link {
    font-size: 0.72rem;
    color: var(--gold-300);
    text-decoration: none;
    font-weight: 600;
}
.forgot-pass-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Submit Button: Champagne Gold Pill */
.btn-auth-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--gold-gradient);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 11px 16px;
    border-radius: 9999px;
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: var(--gold-glow);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 8px;
}
.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(234, 184, 91, 0.5);
}

.btn-auth-submit .arrow-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--text-dark);
    color: var(--gold-300);
}
.btn-auth-submit .arrow-circle svg {
    width: 14px;
    height: 14px;
}

/* Divider: "Sudah punya akun?" */
.auth-divider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 12px;
}
.auth-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}
.auth-divider-text {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

/* Secondary Button: Dark Pill */
.btn-auth-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(14, 34, 60, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.btn-auth-secondary:hover {
    background: rgba(22, 50, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}
.btn-auth-secondary svg {
    width: 16px;
    height: 16px;
}

/* Back to Home Link */
.back-home-wrap {
    margin-top: 18px;
    text-align: center;
}
.back-home-link {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.back-home-link:hover {
    color: #38bdf8;
}
.back-home-link svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   SMOOTH & ELEGANT ANIMATION SUITE + FAST LOADING (SATSET)
   ========================================================================== */

/* Fast Background Skeleton Shimmer */
.auth-bg-container {
    background-color: #040d18;
    background-image: linear-gradient(
        90deg, 
        rgba(4, 13, 24, 0.8) 0%, 
        rgba(10, 26, 48, 0.95) 50%, 
        rgba(4, 13, 24, 0.8) 100%
    );
    background-size: 200% 100%;
    animation: authSkeletonShimmer 2.4s ease-in-out infinite;
}

.auth-bg-image {
    image-rendering: -webkit-optimize-contrast;
    content-visibility: auto;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
    animation: authBgSubtleZoom 10s ease-in-out infinite alternate;
}

/* Smooth Card Entrance */
.auth-card {
    animation: authCardEntrance 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

/* Header Elements Staggered Reveal */
.auth-header {
    animation: authHeaderFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-gold-bar {
    animation: authBarExpand 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Input Fields Smooth Halo Glow on Focus */
.input-field-wrap {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease,
                background-color 0.2s ease;
}

.input-field-wrap:focus-within {
    transform: translateY(-2px);
    border-color: #f2c76e !important;
    box-shadow: 0 0 0 3px rgba(242, 199, 110, 0.25), 0 8px 18px rgba(0, 0, 0, 0.4) !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Primary CTA Luxury Golden Pulse */
.btn-auth-primary {
    animation: authBtnPulse 3.5s ease-in-out 1s infinite;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.2s ease;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(234, 184, 91, 0.5);
}

.btn-auth-primary:active,
.btn-auth-secondary:active,
.btn-pass-toggle:active {
    transform: scale(0.96) !important;
}

/* Alert Error Shake Entrance */
.auth-alert-error {
    animation: authAlertShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Keyframes */
@keyframes authCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(22px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authHeaderFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authBarExpand {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 42px;
        opacity: 1;
    }
}

@keyframes authBtnPulse {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(234, 184, 91, 0.3);
    }
    50% {
        box-shadow: 0 8px 24px rgba(234, 184, 91, 0.55), 0 0 14px rgba(250, 224, 156, 0.3);
    }
}

@keyframes authBgSubtleZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.03);
    }
}

@keyframes authSkeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes authAlertShake {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    20%, 60% {
        transform: translateX(-4px);
    }
    40%, 80% {
        transform: translateX(4px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

