/* ============================================
   SIWASPIN - Auth Pages Styles
   ============================================ */

/* === Base Reset === */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* === Login Wrapper === */
.login-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* === Clean Grid Background === */
.login-bg-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #eef2f9;
    /* Square grid lines — clean & structured */
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.06) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    background-position: center center;
    z-index: 0;
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
}

/* Floating gradient blobs + vignette */
.login-bg-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -10%;
    right: -8%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatBlob 20s ease-in-out infinite alternate;
}

.login-bg-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Soft warm blob bottom-left */
        radial-gradient(ellipse at 10% 90%, rgba(251, 191, 36, 0.04) 0%, transparent 50%),
        /* Light vignette — only at far edges so dots stay visible */
        radial-gradient(circle at center, transparent 55%, rgba(238, 242, 249, 0.7) 100%);
    pointer-events: none;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-30px, 20px) scale(1.08);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* === Content Container === */
.login-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 24rem;
    padding: 1rem;
}

/* Login page uses wider content for split card */
.login-content-wide {
    max-width: 52rem;
}

/* === Card - Solid White === */
.glass-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

/* === Input Fields === */
.glass-input {
    background: #f9fafb !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    color: #1a1a1a !important;
}

.glass-input::placeholder {
    color: #9ca3af !important;
}

.glass-input:focus {
    background: #ffffff !important;
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

/* === Button === */
.glass-button {
    background: #2563EB;
    border: none;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.glass-button:hover::before {
    left: 100%;
}

.glass-button:hover {
    background: #3B82F6;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

/* === Auth form lock and submit state === */
.auth-form-fields {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.auth-form--locked .auth-form-fields {
    filter: blur(2px);
    opacity: 0.75;
    pointer-events: none;
    user-select: none;
}

.auth-form .glass-button:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-form .glass-button:disabled::before {
    display: none;
}

.auth-is-submitting [data-auth-submit-text],
.auth-submit-loading {
    display: none;
}

.auth-is-submitting .auth-submit-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-submit-spinner {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.5rem;
    animation: auth-submit-spin 1s linear infinite;
}

@keyframes auth-submit-spin {
    to { transform: rotate(360deg); }
}

/* === Divider === */
.glass-divider {
    background: #e5e7eb;
    height: 1px;
}

/* === Checkbox === */
.glass-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.glass-checkbox:checked {
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    border-color: transparent;
}

.glass-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.glass-checkbox:hover {
    border-color: #2563EB;
}

/* === Split Card Layout (Login page) === */
.login-card-split {
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    /* Fixed height — stays the same with or without error messages */
    height: min(92vh, 620px);
}

/* === Hero Panel === */
.hero-panel {
    flex: 1;
    /* Premium Vibrant Blue Gradient (Lebih segar dan dinamis) */
    background: linear-gradient(150deg, #0ea5e9 0%, #2563eb 50%, #1e40af 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* === Form Panel === */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Form section compact spacing */
.form-panel .login-form {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Pin footer at the bottom of the card */
.form-panel .glass-divider {
    margin-top: auto;
}

/* Compact logo when card has fixed height */
.form-panel .login-logo {
    width: 80px !important;
    height: 80px !important;
}

/* Compact header spacing for fixed height card */
.form-panel .login-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.5rem !important;
}

/* Compact form margins for desktop */
.form-panel .login-form .mb-6 {
    margin-bottom: 1rem !important;
}

.form-panel .login-form .mt-6 {
    margin-top: 1rem !important;
}

/* Compact footer padding */
.form-panel .login-footer {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* ── Motif Layer: Circles + Arcs + Glow ── */

/* Large translucent circle — top-right */
.hero-panel::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -120px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
    /* Second ring via box-shadow */
    box-shadow:
        0 0 0 40px rgba(255, 255, 255, 0.04),
        0 0 0 80px rgba(255, 255, 255, 0.02);
}

/* Smaller circle — bottom-left + soft glow accent */
.hero-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -80px;
    left: -60px;
    pointer-events: none;
    z-index: 0;
    box-shadow:
        0 0 0 30px rgba(255, 255, 255, 0.03),
        0 0 80px 20px rgba(96, 165, 250, 0.12);
}

/* Decorative elements added via extra wrapper */
.hero-motif-ring {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-motif-ring-1 {
    width: 180px;
    height: 180px;
    top: 60%;
    right: 10%;
}

.hero-motif-ring-2 {
    width: 100px;
    height: 100px;
    top: 15%;
    left: 20%;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.07);
}

/* Diagonal accent line */
.hero-motif-line {
    position: absolute;
    width: 200%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 30%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.08) 70%,
            transparent 100%);
    top: 35%;
    left: -50%;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 0;
}

.hero-motif-line-2 {
    position: absolute;
    width: 200%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 30%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.05) 70%,
            transparent 100%);
    top: 65%;
    left: -50%;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 0;
}

/* Soft glowing dot accents */
.hero-motif-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-motif-dot-1 {
    top: 20%;
    right: 25%;
}

.hero-motif-dot-2 {
    top: 45%;
    left: 15%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
}

.hero-motif-dot-3 {
    bottom: 25%;
    right: 18%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.18);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* === Lottie Container Styles === */
.hero-lottie-container {
    width: 100%;
    position: relative;
    /* Dihapus delay animasi CSS 0.8 detiknya agar lottie muncul SUPER CEPAT secara instan */
    animation: fadeInLottie 0.3s ease-out both;
}

/* Spotlight glow behind the Lottie animation for maximum contrast/pop */
.hero-lottie-container::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.90); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

@keyframes fadeInLottie {
    from {
        opacity: 0.5;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-text-content {
    animation: slideReveal 0.6s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slideReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 768px) {

    .login-content,
    .login-content-wide {
        max-width: 24rem;
    }

    .hero-panel {
        display: none;
    }

    .login-card-split {
        flex-direction: column;
        /* Lock mobile height to match the error state height (~520px) to maintain visual consistency without large empty gaps */
        height: auto;
        min-height: min(88vh, 520px) !important;
    }

    .form-panel {
        overflow: visible;
    }

    .form-panel .login-logo {
        width: 72px !important;
        height: 72px !important;
    }

    .form-panel .login-header {
        padding-top: 0.5rem !important;
        padding-bottom: 0.25rem !important;
    }

    .form-panel .login-header .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .form-panel .login-header h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.125rem !important;
    }

    .form-panel .login-form {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .form-panel .login-form .mb-6 {
        margin-bottom: 0.75rem !important;
    }

    .form-panel .login-form .mt-6 {
        margin-top: 0.75rem !important;
    }

    .form-panel .login-footer {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}
