state
        modal.style.display = 'flex';
        content.innerHTML = `
            <div class="rc-text-center rc-py-xl">
                <div class="rc-spinner"></div>
                <p class="rc-text-muted rc-mt-md">Loading case form...</p>
            </div>
        `;
        
        // Fetch case data for editing
        fetch('/api/v1/cases/' + caseID)
            .then(response => response.json())
            .then(data => {
                const caseData = data.case || data;
                cons