function updateKT1Content() {
    const content = document.getElementById('hypstart-content');
    if (!content || content.dataset.lastHtml === 'kt1') return;

    try {
        const pageData = syncKT1DataFromPage();
        const d = pageData;

        content.innerHTML = `
            <div class="prominence-theme prominence-container" style="padding: 15px; background: #f8fafc;">
                <div class="dt-header" style="margin-bottom: 15px; padding: 20px; background: white; border-bottom: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);">
                    <div class="dt-page-id">KV RİSK TARAMA</div>
                    <h2 style="margin:0; font-size: 18px;"><i class="fa fa-user-check" style="color: #6366f1; margin-right: 8px;"></i>ANAMNEZ & MUAYENE</h2>
                </div>

                <div style="background: #ffffff; border: 1px solid rgba(81, 104, 177, 0.15); border-radius: 16px; padding: 15px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(81, 104, 177, 0.05);">
                    <!-- Unified Vital Signs Row -->
                    <div style="background: #f8faff; border: 1.5px solid #d1d9e6; border-radius: 20px; display: flex; align-items: center; padding: 4px; box-shadow: 0 4px 15px rgba(81, 104, 177, 0.05);">
                        
                        <!-- SİSTOLİK -->
                        <div style="flex: 1; padding: 10px; border-right: 1.5px solid #d1d9e6; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #5168b1; opacity: 0.7; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">SİSTOLİK</div>
                            <input type="text" id="di-sistolik" value="${d.sistolik || '120'}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:18px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>

                        <!-- DİYASTOLİK -->
                        <div style="flex: 1; padding: 10px; border-right: 1.5px solid #d1d9e6; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #5168b1; opacity: 0.7; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">DİYASTOLİK</div>
                            <input type="text" id="di-diyastolik" value="${d.diyastolik || '80'}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:18px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>

                        <!-- NABIZ -->
                        <div style="flex: 1; padding: 10px; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #5168b1; opacity: 0.7; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">NABIZ</div>
                            <input type="text" id="di-nabiz" value="${d.nabiz || '78'}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:18px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>
                    </div>
                    
                    <!-- Unified Physical Measurements Row -->
                    <div style="margin-top: 15px; background: #ffffff; border: 1.5px solid #edf2f7; border-radius: 20px; display: flex; align-items: center; padding: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.02);">
                        
                        <!-- BOY Bölümü -->
                        <div style="flex: 1; padding: 10px; border-right: 1.5px solid #f1f5f9; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #94a3b8; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">BOY (cm)</div>
                            <input type="number" id="di-boy" value="${d.boy || ''}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:15px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>

                        <!-- KİLO Bölümü -->
                        <div style="flex: 1; padding: 10px; border-right: 1.5px solid #f1f5f9; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #94a3b8; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">KİLO (kg)</div>
                            <input type="number" id="di-kilo" value="${d.kilo || ''}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:15px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>

                        <!-- BEL Bölümü -->
                        <div style="flex: 1; padding: 10px; text-align: center;">
                            <div style="font-size: 7px; font-weight: 800; color: #94a3b8; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase;">BEL (cm)</div>
                            <input type="number" id="di-bel" value="${d.bel || ''}" style="width: 100%; border:none; text-align:center; font-weight:900; font-size:15px; color:#1e293b; background:transparent; outline:none; font-family: 'Outfit', sans-serif;">
                        </div>
                    </div>

                    <!-- BMI Card (DI style) -->
                    <div style="margin-top: 20px; padding: 18px; background: #ffffff; border-radius: 20px; border: 1px solid #edf2f7; box-shadow: 0 10px 30px rgba(0,0,0,0.04); position: relative; overflow: hidden;">
                        <div style="display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px;">
                            <div>
                                <div style="font-size: 8px; font-weight: 800; color: #94a3b8; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px;">VÜCUT KİTLE İNDEKSİ</div>
                                <div id="di-bmi-label" style="font-size: 13px; font-weight: 800; color: #94a3b8;">--</div>
                            </div>
                            <div style="text-align: right;">
                                <span id="di-bmi-val" style="font-size: 26px; font-weight: 900; color: #1e293b; line-height: 1;">--</span>
                                <span style="font-size: 10px; font-weight: 700; color: #94a3b8; margin-left: 2px;">kg/m²</span>
                            </div>
                        </div>
                        
                        <!-- Segmented Bar -->
                        <div style="height: 10px; background: #f1f5f9; border-radius: 10px; position: relative; display: flex; gap: 2px; padding: 2px;">
                            <div style="flex: 18.5; background: #3b82f6; border-radius: 6px 0 0 6px; opacity: 0.15;" id="di-bmi-seg-1"></div>
                            <div style="flex: 6.5; background: #10b981; opacity: 0.15;" id="di-bmi-seg-2"></div>
                            <div style="flex: 5; background: #f59e0b; opacity: 0.15;" id="di-bmi-seg-3"></div>
                            <div style="flex: 10; background: #ef4444; border-radius: 0 6px 6px 0; opacity: 0.15;" id="di-bmi-seg-4"></div>
                            
                            <div id="di-bmi-dot" style="position: absolute; top: -3px; left: 0%; width: 16px; height: 16px; background: #fff; border: 3px solid #cbd5e1; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); z-index: 2; display: none;"></div>
                        </div>
                        <div id="di-bmi-advice" style="margin-top: 12px; font-size: 10px; font-weight: 700; color: #64748b; text-align: center; font-family: 'Outfit', sans-serif;">Boy ve kilo giriniz</div>
                    </div>
                </div>

                <div style="background: #ffffff; border: 1px solid rgba(81, 104, 177, 0.15); border-radius: 16px; padding: 15px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(81, 104, 177, 0.05);">
                    <!-- Smoking -->
                    <div class="di-field-group" style="margin-bottom: 15px;">
                        <div style="font-size: 10px; font-weight: 800; color: #5168b1; margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase;">
                            <i class="fa fa-smoking" style="width: 15px;"></i>SİGARA KULLANIMI
                        </div>
                        <div style="background: #f8faff; border: 1.5px solid #d1d9e6; border-radius: 12px; padding: 4px;">
                            <select id="dt6-smoking" style="width: 100%; border:none; background:transparent; font-size:13px; font-weight:700; color:#1e293b; outline:none; padding: 8px; cursor: pointer; font-family: 'Outfit', sans-serif;">
                                <option value="" disabled selected>Seçiniz</option>
                                <option value="Hiç tütün ve/veya tütün ürünü kullanmamış" ${(d.sigara || '').includes('Hiç tütün') ? 'selected' : ''}>Hiç tütün kullanmamış</option>
                                <option value="Her gün düzenli tütün ve/veya tütün ürünü içiyor" ${(d.sigara || '').includes('Her gün') ? 'selected' : ''}>Düzenli içiyor</option>
                                <option value="Ara sıra tütün ve/veya tütün ürünü (nargile vb. dahil) içiyor" ${(d.sigara || '').includes('Ara sıra') ? 'selected' : ''}>Ara sıra içiyor</option>
                                <option value="Eski kullanıcı (tütün ve/veya tütün ürününü bıraktı)" ${(d.sigara || '').includes('Eski') ? 'selected' : ''}>Bırakmış (Eski)</option>
                            </select>
                        </div>
                    </div>
                    <!-- Exercise -->
                    <div class="di-field-group">
                        <div style="font-size: 10px; font-weight: 800; color: #5168b1; margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase;">
                            <i class="fa fa-running" style="width: 15px;"></i>EGZERSİZ ALIŞKANLIĞI
                        </div>
                        <div style="background: #f8faff; border: 1.5px solid #d1d9e6; border-radius: 12px; padding: 4px;">
                            <select id="dt6-exercise" style="width: 100%; border:none; background:transparent; font-size:13px; font-weight:700; color:#1e293b; outline:none; padding: 8px; cursor: pointer; font-family: 'Outfit', sans-serif;">
                                <option value="" disabled selected>Seçiniz</option>
                                <option value="Haftanın 3 günü veya daha fazla günde en az 25 dakika yüksek şiddetli fiziksel aktivite" ${(d.egzersiz || '').includes('25 dakika') && !(d.egzersiz || '').includes('Hem haftanın') ? 'selected' : ''}>Haftada >=3 gün / >=25dk (Yüksek)</option>
                                <option value="Haftanın 5 günü veya daha fazla günde en az 30 dakika orta şiddetli fiziksel aktivite" ${(d.egzersiz || '').includes('30 dakika') && !(d.egzersiz || '').includes('Hem haftanın') && !(d.egzersiz || '').includes('3-5') ? 'selected' : ''}>Haftada >=5 gün / >=30dk (Orta)</option>
                                <option value="Hem haftanın 3 günü veya daha fazla günde en az 25 dakika yüksek şiddetli, hem de haftanın 5 günü veya daha fazla günde en az 30 dakika orta şiddetli fiziksel aktivite" ${(d.egzersiz || '').includes('Hem haftanın') ? 'selected' : ''}>Hem Yüksek Hem Orta Aktivite</option>
                                <option value="Haftanın 3-5 günü günde 30-40 dakika düşük/orta şiddette aerobik egzersiz" ${(d.egzersiz || '').includes('3-5') ? 'selected' : ''}>Haftada 3-5 gün / 30-40dk (Düşük/Orta)</option>
                                <option value="Yetersiz (ilk 3 seçenekten az)" ${(d.egzersiz || '').includes('Yetersiz') ? 'selected' : ''}>Yetersiz Aktivite</option>
                                <option value="Yapmıyor" ${(d.egzersiz || '').includes('Yapmıyor') ? 'selected' : ''}>Egzersiz Yapmıyor</option>
                            </select>
                        </div>
                    </div>
                </div>

                <!-- Actions -->
                <div style="padding-bottom: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px;">
                    <button id="p-next-btn" style="background: #c2185b; color: white; border: none; width: 100%; border-radius: 12px; padding: 14px 25px; font-size: 16px; font-weight: 700; cursor:pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 10px rgba(194, 24, 91, 0.2);">
                        İLERLE VE KAYDET <i class="fa fa-arrow-right" style="font-size: 14px;"></i></button>
                    <button id="kt1-cancel-btn" style="background: transparent; border: none; color: #94a3b8; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; opacity: 0.8;">
                        <i class="fa fa-times-circle"></i>Taramayı İptal Et
                    </button>
                </div>
            </div>
        `;
        content.dataset.lastHtml = 'kt1';

        // --- Logic Integration ---
        const updateBMI = () => {
            const boy = parseFloat(document.getElementById('di-boy')?.value);
            const kilo = parseFloat(document.getElementById('di-kilo')?.value);
            const valEl = document.getElementById('di-bmi-val');
            const labelEl = document.getElementById('di-bmi-label');
            const dotEl = document.getElementById('di-bmi-dot');
            const adviceEl = document.getElementById('di-bmi-advice');

            if (boy > 0 && kilo > 0 && valEl) {
                const heightM = boy / 100;
                const bmi = kilo / (heightM ** 2);
                valEl.innerText = bmi.toFixed(1);
                dotEl.style.display = 'block';

                let label = "NORMAL", color = "#10b981", pos = 0;

                // Segments: Under(18.5), Normal(6.5), Over(5), Obese(10) - Total 40
                if (bmi < .5) {
                    label = "ZAYIF"; color = "#3b82f6";
                    pos = (bmi / 18.5) * (18.5 / 40) * 100;
                } else if (bmi < 25) {
                    label = "NORMAL"; color = "#10b981";
                    pos = ((18.5 / 40) + ((bmi - 18.5) / 6.5) * (6.5 / 40)) * 100;
                } else if (bmi < 30) {
                    label = "FAZLA KİLOLU"; color = "#f59e0b";
                    pos = ((25 / 40) + ((bmi - 25) / 5) * (5 / 40)) * 100;
                } else {
                    label = "OBEZ"; color = "#ef4444";
                    pos = ((30 / 40) + Math.min((bmi - 30) / 10, 1) * (10 / 40)) * 100;
                }

                labelEl.innerText = label;
                labelEl.style.color = color;
                dotEl.style.left = `calc(${pos}% - 8px)`;
                dotEl.style.borderColor = color;
                dotEl.style.boxShadow = `${color}66 0 4px 10px`;

                // Advice
                const minIdeal = (18.5 * (heightM ** 2)).toFixed(1);
                const maxIdeal = (24.9 * (heightM ** 2)).toFixed(1);
                if (bmi > 24.9) {
                    const diff = (kilo - maxIdeal).toFixed(1);
                    adviceEl.innerHTML = `<i class="fa fa-exclamation-circle" style="color:#f59e0b"></i>Hedef: <span style="color:#10b981">${maxIdeal} kg</span> (~${diff} kg vermeli)`;
                } else if (bmi < .5) {
                    const diff = (minIdeal - kilo).toFixed(1);
                    adviceEl.innerHTML = `<i class="fa fa-info-circle" style="color:#3b82f6"></i>Hedef: <span style="color:#10b981">${minIdeal} kg</span> (~${diff} kg almalı)`;
                } else {
                    adviceEl.innerHTML = `<i class="fa fa-check-circle" style="color:#10b981"></i>İdeal kilo aralığındasınız.`;
                }

                // Segments highlight
                for (let i = 1; i <= 4; i++) {
                    const seg = document.getElementById(`di-bmi-seg-${i}`);
                    if (seg) seg.style.opacity = '0.15';
                }
                const activeSegIdx = bmi < 18.5 ? 1 : bmi < 25 ? 2 : bmi < 30 ? 3 : 4;
                const activeSeg = document.getElementById(`di-bmi-seg-${activeSegIdx}`);
                if (activeSeg) activeSeg.style.opacity = '0.8';
            }
        };

        // Event Listeners
        ['di-boy', 'di-kilo'].forEach(id => {
            const el = document.getElementById(id);
            if (el) el.addEventListener('input', updateBMI);
        });

        const nextBtn = document.getElementById('p-next-btn');
        if (nextBtn) {
            nextBtn.onclick = async () => {
                nextBtn.disabled = true;
                nextBtn.innerHTML = `Eşitleniyor... <i class="fa fa-spinner fa-spin" style="margin-left: 8px;"></i>`;

                // Tüm panel verilerini topla
                const boyVal = document.getElementById('di-boy')?.value;
                const kiloVal = document.getElementById('di-kilo')?.value;
                const belVal = document.getElementById('di-bel')?.value;
                const sysVal = document.getElementById('di-sistolik')?.value;
                const diaVal = document.getElementById('di-diyastolik')?.value;
                const nabVal = document.getElementById('di-nabiz')?.value;

                const sigaraSelect = document.getElementById('dt6-smoking');
                const sigaraText = sigaraSelect.options[sigaraSelect.selectedIndex]?.value;
                const egzersizSelect = document.getElementById('dt6-exercise');
                const egzersizText = egzersizSelect.options[egzersizSelect.selectedIndex]?.value;

                // SINA DOM Manipülasyonu
                const setVal = (el, val) => {
                    if (el && val !== undefined) {
                        el.value = val;
                        el.dispatchEvent(new Event('input', { bubbles: true }));
                        el.dispatchEvent(new Event('change', { bubbles: true }));
                    }
                };

                const physInputs = Array.from(document.querySelectorAll('#physicalExaminationInput input, hyp-number-input input'))
                    .filter(input => input.offsetWidth > 0 || input.offsetHeight > 0);

                if (physInputs.length >= 6) {
                    setVal(physInputs[0], sysVal);
                    setVal(physInputs[1], diaVal);
                    setVal(physInputs[2], nabVal);

                    if (parseFloat(physInputs[3].value.replace(',', '.') || '0') > 130 || boyVal > 130) {
                        setVal(physInputs[3], boyVal);
                        setVal(physInputs[4], kiloVal);
                        setVal(physInputs[5], belVal);
                    } else {
                        setVal(physInputs[4], boyVal);
                        setVal(physInputs[5], kiloVal);
                        if (physInputs[6]) setVal(physInputs[6], belVal);
                    }
                }

                const selectDropdownP = async (labelWord, text) => {
                    if (!text || text.includes('Seçiniz')) return;
                    const labels = Array.from(document.querySelectorAll('label, .hyp-title'));
                    const targetLabel = labels.find(l => l.innerText.toLowerCase().includes(labelWord.toLowerCase()));
                    if (targetLabel) {
                        const container = targetLabel.closest('.ui-g') || targetLabel.parentElement;
                        if (container) {
                            const drpTrigger = container.querySelector('.ui-dropdown-label, .ui-dropdown-trigger');
                            if (drpTrigger) {
                                drpTrigger.click();
                                await new Promise(r => setTimeout(r, 200));
                                const opts = Array.from(document.querySelectorAll('.ui-dropdown-item'));
                                const opt = opts.find(o => o.innerText.trim() === text.trim() || o.innerText.includes(text.substring(0, 10)));
                                if (opt) opt.click();
                                else document.body.click();
                                await new Promise(r => setTimeout(r, 200));
                            }
                        }
                    }
                };

                await selectDropdownP('tütün', sigaraText);
                await selectDropdownP('egzersiz', egzersizText);

                nextBtn.innerHTML = `Sayfa Geçiliyor... <i class="fa fa-circle-notch fa-spin" style="margin-left: 8px;"></i>`;
                await new Promise(r => setTimeout(r, 800));

                const tryClick = () => {
                    const candidates = Array.from(document.querySelectorAll('button, .ui-button, span.ui-button-text, .ui-clickable'));
                    const btn = candidates.find(b => {
                        const t = (b.innerText || '').trim();
                        // Unicode for 'İlerle' is \u0130lerle
                        return (t === 'İlerle' || t === 'iÃ‚Â·lerle' || t === 'ilerle' || t === '\u0130lerle' || t === 'İLERLE VE KAYDET') &&
                            b.offsetParent !== null && !b.closest('.hypstart-panel');
                    });
                    if (btn) {
                        (btn.closest('button') || btn).click();
                        return true;
                    }
                    return false;
                };

                if (!tryClick()) {
                    console.warn("rEvolution: KT1 'İlerle' butonu bulunamadı, bekleniyor...");
                }

                // URL Değişimini Bekle
                let checkCount = 0;
                const checkUrl = setInterval(() => {
                    const curUrl = window.location.href.toLowerCase();
                    if (curUrl.includes('kvh/medikalozgecmis') || curUrl.includes('kvh/muayene')) {
                        clearInterval(checkUrl);
                        navigateTo('kt2');
                        return;
                    }

                    // Popup Handling
                    const popupBtn = Array.from(document.querySelectorAll('button, .ui-button-text')).find(b => {
                        const t = (b.innerText || '').toLowerCase();
                        return ((t === 'hayır' && b.closest('.ui-dialog')) || t === 'kapat') && b.offsetParent !== null;
                    });
                    if (popupBtn) (popupBtn.closest('button') || popupBtn).click();

                    if (++checkCount > 100) {
                        clearInterval(checkUrl);
                        nextBtn.disabled = false;
                        nextBtn.innerHTML = `İLERLE VE KAYDET <i class="fa fa-arrow-right"></i>`;
                    }
                }, 100);
            };
        }

        const cancelBtn = document.getElementById('kt1-cancel-btn');
        if (cancelBtn) {
            cancelBtn.onclick = async () => {
                const cancelBtnSina = Array.from(document.querySelectorAll('span.ui-button-text, button')).find(b =>
                    (b.innerText || '').trim() === 'Taramayı İptal Et'
                );
                if (cancelBtnSina) {
                    cancelBtnSina.click();
                    // Modal ve Onay butonu bekle
                    setTimeout(() => {
                        const confirmBtn = Array.from(document.querySelectorAll('button, span.ui-button-text')).find(b =>
                            (b.innerText || '').trim() === 'Onayla' || (b.innerText || '').trim() === 'Evet'
                        );
                        if (confirmBtn) confirmBtn.click();
                    }, 500);
                }
            };
        }

        updateBMI();

        // Background Sync
        const syncInterval = setInterval(() => {
            const currentContent = document.getElementById('hypstart-content');
            if (!currentContent || currentContent.dataset.lastHtml !== 'kt1') {
                clearInterval(syncInterval);
                return;
            }
            const freshData = syncKT1DataFromPage();
            const updateField = (id, val) => {
                const el = document.getElementById(id);
                if (el && val && !el.value) {
                    el.value = val;
                    if (id === 'di-boy' || id === 'di-kilo') updateBMI();
                }
            };
            updateField('di-boy', freshData.boy);
            updateField('di-kilo', freshData.kilo);
            updateField('di-bel', freshData.bel);
            updateField('di-sistolik', freshData.sistolik);
            updateField('di-diyastolik', freshData.diyastolik);
            updateField('di-nabiz', freshData.nabiz);
        }, 300);

    } catch (err) {
        console.error("KT1 Update Error:", err);
    }
}

function updateKT_medikalContent() {
    const content = document.getElementById('hypstart-content');
    if (!content || content.dataset.lastHtml === 'kt_medikal') return;

    content.innerHTML = `
        <div class="screening-page-container prominence-theme" style="padding: 15px; background: #f8fafc; height: 100%; display: flex; flex-direction: column; justify-content: space-between;">
            <div>
                <div class="dt-header" style="margin-bottom: 15px; padding: 20px; background: white; border-bottom: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);">
                    <div class="dt-page-id">KV RİSK TARAMA</div>
                    <h2 style="margin:0; font-size: 18px;"><i class="fa fa-history" style="color: #6366f1; margin-right: 8px;"></i>MEDİKAL ÖZGEÇMİŞ</h2>
                </div>
                <div style="background: #ffffff; border: 1px solid rgba(81, 104, 177, 0.15); border-radius: 16px; padding: 15px; box-shadow: 0 4px 15px rgba(81, 104, 177, 0.05); text-align: center;">
                    <i class="fa fa-forward" style="font-size: 30px; color: #94a3b8; margin-bottom: 15px;"></i>
                    <div style="color: #1e3a8a; font-size: 14px; font-weight: 500; line-height: 1.5;">
                        Medikal Özgeçmiş sayfasında doldurulacak eklenti alanı bulunmamaktadır. Lütfen SİNA üzerinden 'İlerle' butonuna tıklayarak Ayrıntılı Muayene ekranına geçiniz.
                    </div>
                </div>
            </div>
            <div style="padding-bottom: 20px; text-align: center;">
                <button onclick="
                    const btn = Array.from(document.querySelectorAll('button, span.ui-button-text')).find(b => (b.innerText || '').trim().toLowerCase().includes('iÌ‡lerle') || (b.innerText || '').trim().toLowerCase().includes('ilerle'));
                    if (btn) (btn.closest('button') || btn).click();
                " style="background: #c2185b; color: white; border: none; border-radius: 12px; padding: 12px 25px; font-size: 14px; font-weight: 600; cursor:pointer;">Sayfayı Otomatik Geç</button>
            </div>
        </div>
    `;
    content.dataset.lastHtml = 'kt_medikal';
}

function updateKIZ_medikalContent() {
    const content = document.getElementById('hypstart-content');
    if (!content || content.dataset.lastHtml === 'kiz_medikal') return;

    content.innerHTML = `
        <div class="screening-page-container prominence-theme" style="padding: 15px; background: #f8fafc; height: 100%; display: flex; flex-direction: column; justify-content: space-between;">
            <div>
                <div class="dt-header" style="margin-bottom: 15px; padding: 20px; background: white; border-bottom: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);">
                    <div class="dt-page-id">KARDİYOVASKÜLER İZLEM</div>
                    <h2 style="margin:0; font-size: 18px;"><i class="fa fa-history" style="color: #6366f1; margin-right: 8px;"></i>MEDİKAL ÖZGEÇMİŞ</h2>
                </div>
                <div style="background: #ffffff; border: 1px solid rgba(81, 104, 177, 0.15); border-radius: 16px; padding: 15px; box-shadow: 0 4px 15px rgba(81, 104, 177, 0.05); text-align: center;">
                    <i class="fa fa-forward" style="font-size: 30px; color: #94a3b8; margin-bottom: 15px;"></i>
                    <div style="color: #1e3a8a; font-size: 14px; font-weight: 500; line-height: 1.5;">
                        Medikal Özgeçmiş sayfasında doldurulacak eklenti alanı bulunmamaktadır. Lütfen SİNA üzerinden 'İlerle' butonuna tıklayarak Muayene ekranına geçiniz.
                    </div>
                </div>
            </div>
            <div style="padding-bottom: 20px; text-align: center;">
                <button onclick="
                    const btn = Array.from(document.querySelectorAll('button, span.ui-button-text')).find(b => (b.innerText || '').trim().toLowerCase().includes('iÌ‡lerle') || (b.innerText || '').trim().toLowerCase().includes('ilerle'));
                    if (btn) (btn.closest('button') || btn).click();
                " style="background: #5b2e4d; color: white; border: none; border-radius: 12px; padding: 12px 25px; font-size: 14px; font-weight: 600; cursor:pointer;">Sayfayı Otomatik Geç</button>
            </div>
        </div>
    `;
    content.dataset.lastHtml = 'kiz_medikal';
}

