/* ===================================================
   AUTH PREMIUM - Login & Register Pages
   Modern glassmorphism, animated gradient, mobile responsive
   =================================================== */

/* Premium animated background */
.auth-premium-bg {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.35), transparent 25%),
                radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.35), transparent 25%),
                linear-gradient(135deg, #eef2ff 0%, #dbeafe 50%, #f5f3ff 100%);
    background-attachment: fixed;
}

.auth-premium-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 70%);
    animation: authBgPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authBgPulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.1); }
    66% { transform: translate(-5%, -5%) scale(0.95); }
}

.auth-premium-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.auth-premium-orb.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    top: -100px;
    right: -100px;
    animation: authFloat 8s ease-in-out infinite;
}

.auth-premium-orb.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    bottom: -80px;
    left: -80px;
    animation: authFloat 10s ease-in-out infinite reverse;
}

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(0, 20px); }
}

/* Main container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    animation: authFadeInUp 0.7s ease-out;
}

@keyframes authFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass card */
.auth-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 28px;
    padding: 48px 42px;
    box-shadow: 0 25px 80px rgba(79, 70, 229, 0.18),
                0 0 0 1px rgba(255, 255, 255, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0.8;
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Header / branding */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.auth-header .navbar-brand {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.6rem !important;
    font-weight: 800;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 24px !important;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header .navbar-brand img {
    max-height: 48px !important;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
    -webkit-text-fill-color: initial;
}

.auth-header .navbar-brand i {
    font-size: 1.8rem;
    -webkit-text-fill-color: initial;
    color: #3b82f6;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 500;
}

/* Form groups */
.auth-form-group {
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.auth-form-label i {
    color: #3b82f6;
    font-size: 0.85rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 18px;
    background: rgba(241, 245, 249, 0.9) !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    color: #0f172a !important;
    font-size: 0.96rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #64748b;
}

.auth-input:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15),
                0 0 20px rgba(59, 130, 246, 0.15);
    outline: none;
}

.auth-input.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.auth-toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-toggle-pw:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.auth-field-error {
    color: #f87171;
    font-size: 0.82rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Primary button */
.btn-primary.w-100,
.auth-card .btn-primary.w-100 {
    height: 56px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    border: none !important;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary.w-100:hover,
.auth-card .btn-primary.w-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(59, 130, 246, 0.45);
}

.btn-primary.w-100:active,
.auth-card .btn-primary.w-100:active {
    transform: translateY(0) scale(0.98);
}

/* Outline button */
.btn-outline.w-100,
.auth-card .btn-outline.w-100 {
    height: 52px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    transition: all 0.3s ease;
}

.btn-outline.w-100:hover,
.auth-card .btn-outline.w-100:hover {
    background: rgba(59, 130, 246, 0.06) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #3b82f6 !important;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Neutralkan sisa style dark lama dari style.css (position:absolute + pil gelap) */
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.auth-divider span {
    background: #ffffff;
    color: #64748b;
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.back-link:hover {
    color: #3b82f6;
    transform: translateX(-3px);
}

/* Terms */
.auth-terms {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.auth-terms a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* Demo card */
.auth-demo-card {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.12);
    animation: authFadeInUp 0.8s ease-out 0.1s both;
    position: relative;
    z-index: 1;
}

.auth-demo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-demo-btn {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-demo-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* Alerts */
.auth-card .alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.3);
    position: relative;
    z-index: 1;
}

.auth-card .alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.auth-card .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .auth-premium-bg {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-card {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .auth-title {
        font-size: 1.7rem;
    }

    .auth-subtitle {
        font-size: 0.85rem;
    }

    .auth-input {
        height: 52px;
        font-size: 0.95rem;
    }

    .btn-primary.w-100,
    .auth-card .btn-primary.w-100 {
        height: 54px;
        font-size: 0.98rem;
    }

    .auth-demo-grid {
        grid-template-columns: 1fr;
    }

    .auth-demo-card {
        padding: 16px 18px;
    }
}

@media (min-width: 1200px) {
    .auth-container {
        max-width: 560px;
    }
}
