/* ========================================
   PortalRental Login Page — Dapodik Style
   ======================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Animated background */
.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    overflow: hidden;
}

/* Tech/Modern Grid Overlay */
.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(26, 115, 232, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 115, 232, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

/* Premium Orbs with complex animation */
.login-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.85;
    z-index: 0;
}

.login-bg .orb-1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.55), rgba(0, 201, 167, 0.35));
    top: -150px;
    left: -150px;
    animation: floatOrb1 90s ease-in-out infinite;
}

.login-bg .orb-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.45), rgba(26, 115, 232, 0.45));
    bottom: -100px;
    right: -100px;
    animation: floatOrb2 85s ease-in-out infinite;
}

.login-bg .orb-3 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(26, 115, 232, 0.4));
    top: 50%;
    left: 50%;
    animation: floatOrb3 100s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(85vw, 5vh) scale(1.1); } /* Ujung Kanan Atas */
    50%  { transform: translate(80vw, 80vh) scale(0.9); } /* Ujung Kanan Bawah */
    75%  { transform: translate(5vw, 85vh) scale(1.15); } /* Ujung Kiri Bawah */
    100% { transform: translate(0, 0) scale(1); } /* Kembali ke Kiri Atas */
}

@keyframes floatOrb2 {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(-85vw, -5vh) scale(1.15); } /* Ujung Kiri Bawah */
    50%  { transform: translate(-80vw, -85vh) scale(0.85); } /* Ujung Kiri Atas */
    75%  { transform: translate(-5vw, -80vh) scale(1.1); } /* Ujung Kanan Atas */
    100% { transform: translate(0, 0) scale(1); } /* Kembali ke Kanan Bawah */
}

@keyframes floatOrb3 {
    0%   { transform: translate(-50%, -50%) scale(1); }
    25%  { transform: translate(calc(-50% + 40vw), calc(-50% - 40vh)) scale(1.25); } /* Ujung Kanan Atas */
    50%  { transform: translate(calc(-50% - 40vw), calc(-50% + 40vh)) scale(0.75); } /* Ujung Kiri Bawah */
    75%  { transform: translate(calc(-50% - 35vw), calc(-50% - 35vh)) scale(1.15); } /* Ujung Kiri Atas */
    100% { transform: translate(-50%, -50%) scale(1); } /* Kembali ke Tengah */
}

/* Login Card */
.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px 40px 60px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-logo {
    text-align: center;
    margin-bottom: 10px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.3);
}

.login-logo h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 14px;
}

.login-form .form-group label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.login-form .input-wrapper {
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.login-form .form-control {
    padding: 12px 14px 12px 44px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.login-form .form-control:focus + .input-icon,
.login-form .input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn .spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.login-btn.loading .spinner-sm {
    display: inline-block;
}

.login-btn.loading .btn-text {
    display: none;
}

/* Error message */
.login-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
    animation: fadeIn var(--transition-fast);
}

.login-error.show {
    display: flex;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }
}
