import re
print("Aligning VIP room fields and fixing rendering in live_marketing_index.html...")
with open('/workspace/live_marketing_index.html', 'r', encoding='utf-8') as f:
html = f.read()
# Replace the VIP card mapping section in renderGoogleAdsB2BView
old_vip_map = """
${data.vip_rooms.map(room => {
let isCrit = room.status === 'critical';
let isWarn = room.status === 'warning';
let badgeBg = isCrit ? '#FFE4E6' : (isWarn ? '#FEF3C7' : '#DCFCE7');
let badgeColor = isCrit ? '#9F1239' : (isWarn ? '#92400E' : '#166534');
let badgeText = isCrit ? '⚠️ بحرانی (فاصله زیاد از تارگت)' : (isWarn ? '⚡ نیازمند توجه' : '✅ در مسیر تارگت');
return `
${room.room_name}
${room.genre} | ظرفیت: ${room.capacity_per_slot} نفر
${badgeText}
رزرو شده: ${room.booked_slots} از ${room.target_slots} سانس${room.completion_pct}%