summary);
                        tabBtns.forEach(b => b.classList.remove('active'));
                        tabContents.forEach(c => c.classList.remove('active'));
                        document.querySelector('.tab-btn[data-tab="summary"]').classList.add('active');
                        document.getElementById('summary').classList.add('active');
                    } else {
                        alert(result.error);
                    }
                } catch (error) {
                    console.