"""
Internationalization (i18n) module for Jadwa AI.
Provides AR/EN translations for all UI strings.
"""

TRANSLATIONS = {
    # ── Navigation ──
    "nav.dashboard": {"ar": "لوحة التحكم", "en": "Dashboard"},
    "nav.market": {"ar": "السوق", "en": "Marketplace"},
    "nav.society": {"ar": "مجتمع المشاريع", "en": "Society"},
    "nav.grants": {"ar": "المنح", "en": "Grants"},
    "nav.courses": {"ar": "الدورات", "en": "Courses"},
    "nav.tickets": {"ar": "التذاكر", "en": "Tickets"},
    "nav.new_study": {"ar": "دراسة جديدة", "en": "New Study"},
    "nav.notifications": {"ar": "الإشعارات", "en": "Notifications"},
    "nav.no_notifications": {"ar": "لا توجد إشعارات جديدة", "en": "No new notifications"},
    "nav.view_all": {"ar": "عرض الكل", "en": "View All"},
    "nav.investor": {"ar": "مستثمر", "en": "Investor"},
    "nav.settings": {"ar": "إعدادات الحساب", "en": "Account Settings"},
    "nav.subscriptions": {"ar": "الاشتراكات", "en": "Subscriptions"},
    "nav.admin": {"ar": "لوحة الإدارة", "en": "Admin Panel"},
    "nav.logout": {"ar": "تسجيل الخروج", "en": "Logout"},
    "nav.login": {"ar": "تسجيل دخول", "en": "Login"},
    "nav.register": {"ar": "إنشاء حساب", "en": "Create Account"},

    # ── Footer ──
    "footer.terms": {"ar": "الشروط", "en": "TERMS"},
    "footer.privacy": {"ar": "الخصوصية", "en": "PRIVACY"},
    "footer.support": {"ar": "الدعم", "en": "SUPPORT"},
    "footer.api": {"ar": "API", "en": "API"},
    "footer.rights": {"ar": "جميع الحقوق محفوظة", "en": "ALL RIGHTS RESERVED"},

    # ── Dashboard ──
    "dash.title": {"ar": "لوحة التحكم", "en": "Dashboard"},
    "dash.my_studies": {"ar": "حملاتي التسويقية", "en": "My Campaigns"},
    "dash.total_reports": {"ar": "إجمالي التقارير", "en": "Total Reports"},
    "dash.go_count": {"ar": "مشاريع ناجحة", "en": "GO Projects"},
    "dash.nogo_count": {"ar": "مشاريع مرفوضة", "en": "NO-GO Projects"},
    "dash.caution_count": {"ar": "تحتاج مراجعة", "en": "Needs Review"},
    "dash.avg_score": {"ar": "متوسط النتيجة", "en": "Average Score"},
    "dash.search": {"ar": "بحث...", "en": "Search..."},
    "dash.newest": {"ar": "الأحدث", "en": "Newest"},
    "dash.oldest": {"ar": "الأقدم", "en": "Oldest"},
    "dash.by_name": {"ar": "بالاسم", "en": "By Name"},
    "dash.all_languages": {"ar": "كل اللغات", "en": "All Languages"},
    "dash.no_reports": {"ar": "لا توجد تقارير بعد", "en": "No reports yet"},
    "dash.create_first": {"ar": "أنشئ أول دراسة جدوى", "en": "Create your first feasibility study"},

    # ── Study ──
    "study.new_title": {"ar": "دراسة جدوى جديدة", "en": "New Feasibility Study"},
    "study.project_name": {"ar": "اسم المشروع", "en": "Project Name"},
    "study.project_desc": {"ar": "وصف المشروع", "en": "Project Description"},
    "study.language": {"ar": "لغة التقرير", "en": "Report Language"},
    "study.arabic": {"ar": "عربي", "en": "Arabic"},
    "study.english": {"ar": "إنجليزي", "en": "English"},
    "study.create": {"ar": "إنشاء الدراسة", "en": "Create Study"},
    "study.new_subtitle": {"ar": "أدخل تفاصيل مشروعك وسيقوم المحرك الذكي ببناء نموذج مالي واستراتيجي كامل", "en": "Enter your project details and the AI engine will build a complete financial and strategic model"},
    "study.name_placeholder": {"ar": "مثال: NeoBank for Freelancers", "en": "e.g. NeoBank for Freelancers"},
    "study.desc_placeholder": {"ar": "اكتب وصفاً دقيقاً: المشكلة، الحل المقترح، الجمهور المستهدف، نموذج الربح المتوقع، والسوق المستهدفة...", "en": "Write a detailed description: the problem, proposed solution, target audience, expected revenue model, and target market..."},
    "study.start_engine": {"ar": "بدء التحليل", "en": "INITIALIZE ENGINE"},
    "study.est_time": {"ar": "الوقت المتوقع: 30-60 ثانية", "en": "ESTIMATED GENERATION TIME: 30-60 SECONDS"},
    "study.generating": {"ar": "جاري التوليد...", "en": "Generating..."},
    "study.view_report": {"ar": "عرض التقرير", "en": "View Report"},
    "study.export_pdf": {"ar": "تصدير PDF", "en": "Export PDF"},
    "study.share": {"ar": "مشاركة", "en": "Share"},

    # ── Billing ──
    "billing.plans_title": {"ar": "خطط الأسعار", "en": "Pricing Plans"},
    "billing.monthly": {"ar": "شهري", "en": "Monthly"},
    "billing.yearly": {"ar": "سنوي (خصم 20%)", "en": "Yearly (20% off)"},
    "billing.per_month": {"ar": "/ شهر", "en": "/ month"},
    "billing.per_year": {"ar": "/ سنة", "en": "/ year"},
    "billing.subscribe": {"ar": "اشترك الآن", "en": "Subscribe Now"},
    "billing.current_plan": {"ar": "خطتك الحالية", "en": "Current Plan"},

    # ── Auth ──
    "auth.login_title": {"ar": "تسجيل الدخول", "en": "Login"},
    "auth.register_title": {"ar": "إنشاء حساب جديد", "en": "Create New Account"},
    "auth.email": {"ar": "البريد الإلكتروني", "en": "Email"},
    "auth.password": {"ar": "كلمة المرور", "en": "Password"},
    "auth.confirm_password": {"ar": "تأكيد كلمة المرور", "en": "Confirm Password"},
    "auth.name": {"ar": "الاسم الكامل", "en": "Full Name"},
    "auth.login_subtitle": {"ar": "أدخل بياناتك للوصول إلى محفظتك الاستثمارية", "en": "Enter your credentials to access your investment portfolio"},
    "auth.remember_me": {"ar": "تذكرني", "en": "Remember me"},
    "auth.forgot_password": {"ar": "نسيت كلمة المرور؟", "en": "Forgot Password?"},
    "auth.no_account": {"ar": "ليس لديك حساب؟", "en": "Don't have an account?"},
    "auth.have_account": {"ar": "لديك حساب بالفعل؟", "en": "Already have an account?"},
    "auth.register_subtitle": {"ar": "أنشئ حسابك للوصول إلى أدوات تحليل الاستثمار الاحترافية", "en": "Create your account to access professional investment analysis tools"},
    "auth.password_hint": {"ar": "كلمة المرور (8 أحرف على الأقل)", "en": "Password (at least 8 characters)"},
    "auth.agree_terms": {"ar": "أوافق على", "en": "I agree to the"},
    "auth.create_free": {"ar": "إنشاء حساب مجاني", "en": "Create Free Account"},

    # ── Campaigns ──
    "camp.title": {"ar": "حملاتي التسويقية", "en": "My Campaigns"},
    "camp.manage_accounts": {"ar": "إدارة الحسابات", "en": "Manage Accounts"},
    "camp.total": {"ar": "إجمالي الحملات", "en": "Total Campaigns"},
    "camp.platforms": {"ar": "المنصات المتصلة", "en": "Connected Platforms"},
    "camp.views": {"ar": "إجمالي المشاهدات", "en": "Total Views"},
    "camp.likes": {"ar": "إجمالي التفاعلات", "en": "Total Engagement"},
    "camp.no_campaigns": {"ar": "لا توجد حملات بعد. أنشئ دراسة جدوى ثم اضغط \"حملة تسويقية\".", "en": "No campaigns yet. Create a feasibility study then click \"Marketing Campaign\"."},
    "camp.video_processing": {"ar": "جاري توليد الفيديو", "en": "Video Processing"},
    "camp.video_ready": {"ar": "الفيديو جاهز", "en": "Video Ready"},
    "camp.script_ready": {"ar": "السيناريو جاهز", "en": "Script Ready"},
    "camp.generating_script": {"ar": "جاري كتابة السيناريو", "en": "Generating Script"},
    "camp.published": {"ar": "تم النشر", "en": "Published"},
    "camp.step1": {"ar": "سيناريو الفيديو", "en": "Video Script"},
    "camp.step2": {"ar": "توليد الفيديو", "en": "Generate Video"},
    "camp.step3": {"ar": "النشر على المنصات", "en": "Publish to Platforms"},
    "camp.generate_script": {"ar": "توليد السيناريو", "en": "Generate Script"},
    "camp.generate_video": {"ar": "توليد الفيديو", "en": "Generate Video"},
    "camp.completed": {"ar": "مكتمل", "en": "Completed"},
    "camp.requires_script": {"ar": "يتطلب إكمال السيناريو أولاً", "en": "Requires script completion first"},
    "camp.requires_video": {"ar": "يتطلب توليد الفيديو أولاً", "en": "Requires video generation first"},
    "camp.publish": {"ar": "نشر", "en": "Publish"},
    "camp.select_platform": {"ar": "اختر منصة واحدة على الأقل", "en": "Select at least one platform"},
    "camp.back": {"ar": "الحملات", "en": "Campaigns"},

    # ── Competitor Analysis ──
    "comp.title": {"ar": "تحليل المنافسين", "en": "Competitor Analysis"},
    "comp.subtitle": {"ar": "سيساعدك الذكاء الاصطناعي في تحديد وتحليل منافسيك", "en": "AI will help you identify and analyze your competitors"},
    "comp.choose_mode": {"ar": "كيف تريد تحليل المنافسين؟", "en": "How would you like to analyze competitors?"},
    "comp.wizard": {"ar": "المساعد الذكي (موصى)", "en": "Smart Assistant (Recommended)"},
    "comp.wizard_desc": {"ar": "سيسألك الذكاء الاصطناعي أسئلة عن سوقك ثم يبحث ويحلل المنافسين تلقائياً", "en": "AI will ask you questions about your market then automatically research and analyze competitors"},
    "comp.direct": {"ar": "إدخال روابط مباشرة", "en": "Enter URLs Directly"},
    "comp.direct_desc": {"ar": "أدخل روابط مواقع المنافسين مباشرة وسيتم تحليلها", "en": "Enter competitor website URLs directly for analysis"},
    "comp.answer_questions": {"ar": "أجب على الأسئلة التالية", "en": "Answer the following questions"},
    "comp.answers_help": {"ar": "إجاباتك ستساعد في تحديد المنافسين بدقة أكبر", "en": "Your answers will help identify competitors more accurately"},
    "comp.next": {"ar": "التالي", "en": "Next"},
    "comp.back": {"ar": "رجوع", "en": "Back"},
    "comp.optional_urls": {"ar": "روابط إضافية (اختياري)", "en": "Additional URLs (Optional)"},
    "comp.optional_urls_desc": {"ar": "إذا كنت تعرف مواقع منافسين محددين، أضف روابطهم هنا. وإلا اتركها فارغة وسيبحث الذكاء الاصطناعي تلقائياً.", "en": "If you know specific competitor websites, add their URLs here. Otherwise leave empty and AI will search automatically."},
    "comp.start_analysis": {"ar": "بدء التحليل", "en": "Start Analysis"},
    "comp.analyzing": {"ar": "جاري البحث والتحليل... قد يستغرق دقيقة", "en": "Researching and analyzing... may take a minute"},
    "comp.competitors": {"ar": "المنافسون", "en": "Competitors"},
    "comp.threat_level": {"ar": "مستوى التهديد", "en": "Threat Level"},
    "comp.advantages": {"ar": "مزاياك التنافسية", "en": "Your Competitive Advantages"},
    "comp.gaps": {"ar": "فجوات السوق", "en": "Market Gaps"},
    "comp.differentiation": {"ar": "التمايز الموصى", "en": "Recommended Differentiation"},
    "comp.recommendations": {"ar": "التوصيات الاستراتيجية", "en": "Strategic Recommendations"},
    "comp.strengths": {"ar": "نقاط القوة", "en": "Strengths"},
    "comp.weaknesses": {"ar": "نقاط الضعف", "en": "Weaknesses"},
    "comp.pricing": {"ar": "التسعير", "en": "Pricing"},

    # ── Brand Kit ──
    "brand.title": {"ar": "هوية العلامة التجارية", "en": "Brand Identity"},
    "brand.style": {"ar": "الأسلوب", "en": "Style"},
    "brand.modern": {"ar": "عصري حديث", "en": "Modern"},
    "brand.luxury": {"ar": "فاخر", "en": "Luxury"},
    "brand.playful": {"ar": "مرح ومبتكر", "en": "Playful & Creative"},
    "brand.corporate": {"ar": "مؤسسي رسمي", "en": "Corporate"},
    "brand.minimal": {"ar": "بسيط أنيق", "en": "Minimal"},
    "brand.generate": {"ar": "توليد هوية العلامة", "en": "Generate Brand Identity"},
    "brand.generating": {"ar": "جاري توليد هوية العلامة...", "en": "Generating brand identity..."},
    "brand.names": {"ar": "اقتراحات الأسماء", "en": "Name Suggestions"},
    "brand.taglines": {"ar": "شعارات مقترحة", "en": "Suggested Taglines"},
    "brand.colors": {"ar": "لوحة الألوان", "en": "Color Palette"},
    "brand.fonts": {"ar": "الخطوط", "en": "Typography"},
    "brand.voice": {"ar": "نبرة العلامة", "en": "Brand Voice"},
    "brand.values": {"ar": "القيم الأساسية", "en": "Core Values"},
    "brand.logos": {"ar": "شعارات مقترحة (AI)", "en": "Suggested Logos (AI)"},
    "brand.generate_logos": {"ar": "توليد 4 شعارات", "en": "Generate 4 Logos"},
    "brand.logos_desc": {"ar": "سيتم توليد 4 تصاميم مختلفة للشعار باستخدام DALL-E 3 بناءً على هوية علامتك التجارية", "en": "4 different logo designs will be generated using DALL-E 3 based on your brand identity"},
    "brand.logos_generating": {"ar": "جاري توليد الشعارات... قد يستغرق 1-2 دقيقة", "en": "Generating logos... may take 1-2 minutes"},
    "brand.download": {"ar": "تحميل", "en": "Download"},
    "brand.heading_font": {"ar": "العناوين", "en": "Headings"},
    "brand.body_font": {"ar": "النصوص", "en": "Body"},
    "brand.accent_font": {"ar": "التمييز", "en": "Accent"},

    # ── Notifications ──
    "notif.title": {"ar": "الإشعارات", "en": "Notifications"},
    "notif.mark_all": {"ar": "تعليم الكل كمقروء", "en": "Mark All as Read"},
    "notif.no_notifications": {"ar": "لا توجد إشعارات", "en": "No notifications"},

    # ── Admin ──
    "admin.title": {"ar": "لوحة الإدارة", "en": "Admin Panel"},
    "admin.users": {"ar": "المستخدمون", "en": "Users"},
    "admin.reports": {"ar": "التقارير", "en": "Reports"},
    "admin.active_subs": {"ar": "الاشتراكات النشطة", "en": "Active Subscriptions"},
    "admin.recent_users": {"ar": "آخر المستخدمين", "en": "Recent Users"},
    "admin.recent_reports": {"ar": "آخر التقارير", "en": "Recent Reports"},
    "admin.ai_config": {"ar": "إعدادات نماذج AI", "en": "AI Model Settings"},
    "admin.analytics": {"ar": "التحليلات", "en": "Analytics"},
    "admin.audit": {"ar": "سجل المراجعة", "en": "Audit Log"},

    # ── Dashboard Extra ──
    "dash.subtitle": {"ar": "نظرة عامة على محفظة دراساتك", "en": "Overview of your studies portfolio"},
    "dash.compare": {"ar": "مقارنة تقارير", "en": "Compare Reports"},
    "dash.plan": {"ar": "الخطة", "en": "Plan"},
    "dash.usage": {"ar": "الاستهلاك", "en": "Usage"},
    "dash.avg_viability": {"ar": "متوسط الجدوى", "en": "Avg Viability"},
    "dash.investors": {"ar": "المستثمرين", "en": "Investors"},
    "dash.notifications": {"ar": "إشعارات", "en": "Notifications"},
    "dash.verdict_dist": {"ar": "توزيع القرارات", "en": "Verdict Distribution"},
    "dash.quick_tools": {"ar": "أدوات سريعة", "en": "Quick Tools"},
    "dash.investors_link": {"ar": "المستثمرين", "en": "Investors"},
    "dash.grants_link": {"ar": "المنح", "en": "Grants"},
    "dash.cofounder": {"ar": "شريك مؤسس", "en": "Co-Founder"},
    "dash.campaigns_link": {"ar": "الحملات", "en": "Campaigns"},
    "dash.market_link": {"ar": "السوق", "en": "Marketplace"},
    "dash.templates_link": {"ar": "القوالب", "en": "Templates"},
    "dash.search_reports": {"ar": "بحث في التقارير...", "en": "Search reports..."},
    "dash.all_langs": {"ar": "كل اللغات", "en": "All Languages"},
    "dash.search_btn": {"ar": "بحث", "en": "Search"},
    "dash.clear_filters": {"ar": "مسح الفلاتر", "en": "Clear Filters"},
    "dash.analysis_log": {"ar": "سجل التحليلات", "en": "Analysis Log"},
    "dash.prev": {"ar": "السابق", "en": "Previous"},
    "dash.next": {"ar": "التالي", "en": "Next"},
    "dash.no_results": {"ar": "لا توجد نتائج لـ", "en": "No results for"},
    "dash.clear_search": {"ar": "مسح البحث", "en": "Clear Search"},
    "dash.empty_portfolio": {"ar": "محفظتك فارغة. ابدأ أول تحليل استثماري لك.", "en": "Your portfolio is empty. Start your first investment analysis."},
    "dash.copy": {"ar": "نسخ", "en": "Copy"},

    # ── Landing ──
    "landing.title": {"ar": "أول منصة سعودية تحول الأفكار إلى شركات ومنتجات", "en": "First Saudi Platform That Turns Ideas Into Companies and Products"},
    "landing.hero_subtitle": {"ar": "محرك الماس الموجه بالذكاء الاصطناعي", "en": "DIRECTED DIAMOND AI ENGINE"},
    "landing.hero_h1_1": {"ar": "حوّل فكرتك إلى", "en": "Turn Your Idea Into"},
    "landing.hero_h1_2": {"ar": "إمبراطورية اقتصادية", "en": "An Economic Empire"},
    "landing.hero_p": {"ar": "منصة ذكاء اصطناعي متكاملة تحاكي عقلية كبار المستشارين، مع +90 ميزة ذكية تشمل التحليل المالي، أبحاث السوق، أدوات المستثمرين، والتسويق الآلي — كل ما تحتاجه لتحويل فكرتك إلى مشروع ناجح.", "en": "A comprehensive AI platform that simulates the mindset of top consultants, with +90 smart features including financial analysis, market research, investor tools, and automated marketing — everything you need to turn your idea into a successful venture."},
    "landing.hero_p2": {"ar": "", "en": ""},
    "landing.start_free": {"ar": "ابدأ مجاناً", "en": "Start Free"},
    "landing.discover": {"ar": "اكتشف المزايا", "en": "Discover Features"},
    "landing.smart_features": {"ar": "ميزة ذكية", "en": "Smart Features"},
    "landing.integrated_systems": {"ar": "نظام متكامل", "en": "Integrated Systems"},
    "landing.how_title": {"ar": "هيكلية الماس الموجه", "en": "Directed Diamond Architecture"},
    "landing.step1_title": {"ar": "أدخل فكرتك", "en": "Enter Your Idea"},
    "landing.step1_desc": {"ar": "اكتب وصف مشروعك واختر اللغة والعملة. الذكاء الاصطناعي يتولى الباقي.", "en": "Write your project description, choose language and currency. AI handles the rest."},
    "landing.step2_title": {"ar": "تحليل شامل في دقائق", "en": "Comprehensive Analysis in Minutes"},
    "landing.step2_desc": {"ar": "12 محرك تحليل يعمل بالتوازي: سوقي، مالي، تنافسي، قانوني، واستراتيجي.", "en": "12 analysis engines running in parallel: market, financial, competitive, legal, and strategic."},
    "landing.step3_title": {"ar": "تصدير واستخدم", "en": "Export & Use"},
    "landing.step3_desc": {"ar": "PDF، PowerPoint، فيديو تسويقي، نشر اجتماعي — كل ما تحتاجه للإطلاق.", "en": "PDF, PowerPoint, marketing video, social publishing — everything you need to launch."},
    "landing.features_title": {"ar": "منصة متكاملة بأكثر من 90 ميزة", "en": "Comprehensive Platform with 90+ Features"},
    "landing.features_subtitle": {"ar": "كل ما يحتاجه رائد الأعمال من الفكرة إلى التنفيذ — في مكان واحد", "en": "Everything an entrepreneur needs from idea to execution — in one place"},
    "landing.cta_title": {"ar": "ابدأ تحليلك الأول مجاناً", "en": "Start Your First Analysis for Free"},
    "landing.cta_subtitle": {"ar": "انضم لآلاف رواد الأعمال الذين يستخدمون Jadwa AI", "en": "Join thousands of entrepreneurs using Jadwa AI"},

    # -- Landing Page Features: AI Analysis --
    "feature.swot": {"ar": "تحليل SWOT", "en": "SWOT Analysis"},
    "feature.swot_desc": {"ar": "نقاط القوة والضعف والفرص والتهديدات", "en": "Strengths, Weaknesses, Opportunities, Threats"},
    "feature.pestel": {"ar": "تحليل PESTEL", "en": "PESTEL Analysis"},
    "feature.pestel_desc": {"ar": "تحليل البيئة السياسية والاقتصادية والاجتماعية والتقنية", "en": "Political, Economic, Social, Technological Analysis"},
    "feature.porters": {"ar": "قوى بورتر الخمس", "en": "Porter's Five Forces"},
    "feature.porters_desc": {"ar": "تحليل القوى التنافسية الخمس في الصناعة", "en": "Analysis of the five competitive forces in the industry"},
    "feature.vrio": {"ar": "تحليل VRIO", "en": "VRIO Analysis"},
    "feature.vrio_desc": {"ar": "تقييم الموارد والقدرات للميزة التنافسية المستدامة", "en": "Assessing resources and capabilities for sustainable competitive advantage"},
    "feature.tamsamsom": {"ar": "تحليل TAM/SAM/SOM", "en": "TAM/SAM/SOM Analysis"},
    "feature.tamsamsom_desc": {"ar": "تحليل حجم السوق الكلي والمستهدف والقابل للتحقيق", "en": "Analysis of Total, Serviceable, and Obtainable Market size"},
    "feature.bmc": {"ar": "نموذج العمل التجاري", "en": "Business Model Canvas"},
    "feature.bmc_desc": {"ar": "نموذج العمل التجاري بتسعة أبعاد", "en": "A nine-segment business model template"},
    "feature.lean_canvas": {"ar": "النموذج الرشيق", "en": "Lean Canvas"},
    "feature.lean_canvas_desc": {"ar": "نموذج الشركات الناشئة الرشيقة", "en": "A lean startup template for business models"},
    "feature.viability_score": {"ar": "مقياس الجدوى 0-100", "en": "Viability Score 0-100"},
    "feature.viability_score_desc": {"ar": "مقياس بصري لتقييم جدوى المشروع بخمسة أبعاد", "en": "A visual score to assess project viability across five dimensions"},
    "feature.gtm_strategy": {"ar": "استراتيجية دخول السوق", "en": "Go-to-Market Strategy"},
    "feature.gtm_strategy_desc": {"ar": "خطة دخول السوق: التسعير، القنوات، التسويق", "en": "Go-to-market plan: pricing, channels, marketing"},
    "feature.mvp_path": {"ar": "تحديد مسار المنتج الأولي", "en": "MVP Path Definition"},
    "feature.mvp_path_desc": {"ar": "تعريف المنتج الأولي وخارطة طريق التطوير", "en": "Defining the Minimum Viable Product and development roadmap"},
    "feature.usp_generator": {"ar": "مولد عرض القيمة الفريد", "en": "USP Generator"},
    "feature.usp_generator_desc": {"ar": "توليد القيمة الفريدة المقترحة للمشروع", "en": "Generating the Unique Selling Proposition for the project"},
    "feature.benchmarks": {"ar": "مقارنات معيارية للصناعة", "en": "Industry Benchmarks"},
    "feature.benchmarks_desc": {"ar": "مقارنة أرقامك مع متوسطات الصناعة", "en": "Compare your numbers with industry averages"},

    # -- Landing Page Features: Financial --
    "feature.interactive_charts": {"ar": "رسوم بيانية تفاعلية", "en": "Interactive Charts"},
    "feature.interactive_charts_desc": {"ar": "رسوم بيانية تفاعلية Chart.js للإيرادات والتكاليف", "en": "Interactive Chart.js charts for revenue and costs"},
    "feature.scenario_simulator": {"ar": "محاكي السيناريوهات المالية", "en": "Financial Scenario Simulator"},
    "feature.scenario_simulator_desc": {"ar": "محاكاة \"ماذا لو\" للأرقام المالية", "en": "'What-if' simulation for financial figures"},
    "feature.revenue_streams": {"ar": "مصادر الإيرادات", "en": "Revenue Streams"},
    "feature.revenue_streams_desc": {"ar": "تحديد مصادر الإيرادات المتعددة بالنسب", "en": "Defining multiple revenue streams with percentages"},
    "feature.cost_breakdown": {"ar": "تفصيل تكاليف التأسيس", "en": "Startup Cost Breakdown"},
    "feature.cost_breakdown_desc": {"ar": "تفصيل تكاليف التأسيس بالبنود والأرقام", "en": "Detailed breakdown of startup costs by item"},
    "feature.multi_currency": {"ar": "دعم عملات متعددة", "en": "Multi-Currency Support"},
    "feature.multi_currency_desc": {"ar": "دعم 10 عملات: SAR, AED, USD, EUR وغيرها", "en": "Support for 10 currencies: SAR, AED, USD, EUR, etc."},
    "feature.zakat_vat": {"ar": "حاسبة الزكاة والضريبة", "en": "Zakat & VAT Calculator"},
    "feature.zakat_vat_desc": {"ar": "تقدير الزكاة المستحقة وضريبة القيمة المضافة", "en": "Estimate due Zakat and Value Added Tax"},

    # -- Landing Page Features: Export & Presentations --
    "feature.pdf_report": {"ar": "تقرير PDF", "en": "PDF Report"},
    "feature.pdf_report_desc": {"ar": "تقرير PDF احترافي مع علامتك التجارية", "en": "Professional PDF report with your branding"},
    "feature.pitch_deck": {"ar": "عرض تقديمي للمستثمرين", "en": "Investor Pitch Deck"},
    "feature.pitch_deck_desc": {"ar": "عرض استثماري PDF + PPTX بـ 10-15 شريحة", "en": "10-15 slide investor pitch deck (PDF + PPTX)"},
    "feature.gamma": {"ar": "تكامل مع Gamma.app", "en": "Gamma.app Integration"},
    "feature.gamma_desc": {"ar": "عروض احترافية عبر Gamma.app", "en": "Professional presentations via Gamma.app"},
    "feature.google_export": {"ar": "تصدير إلى Google Docs/Slides", "en": "Google Docs/Slides Export"},
    "feature.google_export_desc": {"ar": "تصدير للتعاون عبر Google Workspace", "en": "Export for collaboration via Google Workspace"},
    "feature.pitch_email": {"ar": "بريد إلكتروني آلي للمستثمرين", "en": "Automated Pitch Email"},
    "feature.pitch_email_desc": {"ar": "بريد استثماري جاهز للإرسال للمستثمرين", "en": "Ready-to-send pitch email for investors"},
    "feature.pdf_branding": {"ar": "علامة تجارية على PDF", "en": "PDF Branding"},
    "feature.pdf_branding_desc": {"ar": "شعارك وألوانك على التقرير", "en": "Your logo and colors on the report"},
    "feature.share": {"ar": "مشاركة وتعاون", "en": "Share & Collaborate"},
    "feature.share_desc": {"ar": "شارك تقريرك برابط عام مع فريقك أو المستثمرين", "en": "Share your report with a public link to your team or investors"},
    "feature.report_comparison": {"ar": "مقارنة التقارير", "en": "Report Comparison"},
    "feature.report_comparison_desc": {"ar": "قارن تقريرين (فكرتين) جنباً لجنب", "en": "Compare two reports (ideas) side-by-side"},

    # -- Landing Page Features: AI Marketing --
    "feature.video_generation": {"ar": "إنشاء فيديو بالذكاء الاصطناعي", "en": "AI Video Generation"},
    "feature.video_generation_desc": {"ar": "إنتاج فيديو ترويجي بالذكاء الاصطناعي (Google Veo / Sora)", "en": "AI-powered promotional video production (Google Veo / Sora)"},
    "feature.video_script": {"ar": "مولد سيناريو الفيديو", "en": "Video Script Generator"},
    "feature.video_script_desc": {"ar": "سيناريو فيديو تسويقي + voice-over script", "en": "Marketing video script + voice-over script"},
    "feature.social_publishing": {"ar": "نشر على الشبكات الاجتماعية", "en": "Social Publishing"},
    "feature.social_publishing_desc": {"ar": "نشر تلقائي على 6 منصات: TikTok, YouTube, X, Facebook, Instagram, Snapchat", "en": "Automatic publishing to 6 platforms: TikTok, YouTube, X, Facebook, Instagram, Snapchat"},
    "feature.whatsapp_campaigns": {"ar": "حملات واتساب", "en": "WhatsApp Campaigns"},
    "feature.whatsapp_campaigns_desc": {"ar": "حملات واتساب عبر Evolution API v2", "en": "WhatsApp campaigns via Evolution API v2"},
    "feature.campaign_dashboard": {"ar": "لوحة تحكم الحملات", "en": "Campaign Dashboard"},
    "feature.campaign_dashboard_desc": {"ar": "لوحة إحصائيات شاملة لجميع الحملات", "en": "Comprehensive dashboard for all campaigns"},
    "feature.brand_kit": {"ar": "عدة العلامة التجارية بالذكاء الاصطناعي", "en": "AI Brand Kit"},
    "feature.brand_kit_desc": {"ar": "اسم تجاري + شعار + ألوان + خطوط بالذكاء الاصطناعي", "en": "Brand name, logo, colors, and fonts with AI"},

    # -- Landing Page Features: Prototyping & Manufacturing --
    "feature.factory_directory": {"ar": "دليل المصانع", "en": "Factory Directory"},
    "feature.factory_directory_desc": {"ar": "دليل مصانع سعودية مع بحث وتصفية حسب القطاع والمدينة", "en": "Saudi factory directory with search & filter by sector and city"},
    "feature.prototype_request": {"ar": "طلب نموذج أولي", "en": "Prototype Request"},
    "feature.prototype_request_desc": {"ar": "إرسال طلب نموذج أولي مباشرة للمصنع مع المواصفات والميزانية", "en": "Send prototype requests directly to factories with specs and budget"},
    "feature.ai_specs": {"ar": "توليد مواصفات بالـ AI", "en": "AI Specs Generator"},
    "feature.ai_specs_desc": {"ar": "توليد مواصفات تقنية تفصيلية للمنتج تلقائياً من دراسة الجدوى", "en": "Auto-generate detailed product specs from your feasibility study"},
    "feature.ai_cost_estimate": {"ar": "تقدير تكلفة بالـ AI", "en": "AI Cost Estimator"},
    "feature.ai_cost_estimate_desc": {"ar": "تقدير تكلفة المواد والتصنيع والوحدة والمدة الزمنية تلقائياً", "en": "Auto-estimate materials, manufacturing, unit cost, and lead time"},
    "feature.nda_generator": {"ar": "اتفاقية NDA ذكية", "en": "Smart NDA Generator"},
    "feature.nda_generator_desc": {"ar": "توليد اتفاقية عدم إفشاء بالذكاء الاصطناعي مخصصة لمشروعك", "en": "AI-generated NDA customized for your project and factory"},
    "feature.nda_workflow": {"ar": "سير عمل موافقات NDA", "en": "NDA Approval Workflow"},
    "feature.nda_workflow_desc": {"ar": "سير عمل: مستخدم ← مدير ← مصنع مع إشعارات في كل خطوة", "en": "Workflow: user → admin → factory with notifications at every step"},
    "feature.factory_panel": {"ar": "لوحة تحكم المصنع", "en": "Factory Dashboard"},
    "feature.factory_panel_desc": {"ar": "لوحة خاصة بالمصنع لإدارة الطلبات وعروض الأسعار والمحادثة", "en": "Dedicated factory panel for managing requests, quotes, and messaging"},
    "feature.quote_system": {"ar": "نظام عروض الأسعار", "en": "Quote System"},
    "feature.quote_system_desc": {"ar": "إرسال واستقبال عروض أسعار مع مقارنة وقبول ورفض", "en": "Send & receive price quotes with comparison, accept, and reject"},

    # -- Landing Page Features: Roles & Notifications --
    "feature.user_roles": {"ar": "نظام أدوار المستخدمين", "en": "User Role System"},
    "feature.user_roles_desc": {"ar": "أربعة أنواع حسابات: صاحب فكرة، مستثمر، مصنع، حاضنة أعمال", "en": "Four account types: entrepreneur, investor, factory, incubator"},
    "feature.smart_notifications": {"ar": "إشعارات ذكية متقدمة", "en": "Smart Notifications"},
    "feature.smart_notifications_desc": {"ar": "إشعارات فورية لكل الأدوار عند كل خطوة في سير العمل", "en": "Real-time notifications for all roles at every workflow step"},
    "feature.marketplace": {"ar": "سوق المشاريع", "en": "Project Marketplace"},
    "feature.marketplace_desc": {"ar": "عرض وبيع دراسات الجدوى والمشاريع الجاهزة", "en": "List and sell feasibility studies and ready projects"},
    "feature.market_monitor": {"ar": "مراقبة السوق", "en": "Market Monitor"},
    "feature.market_monitor_desc": {"ar": "تتبع المنافسين وتنبيهات السوق في الوقت الحقيقي", "en": "Track competitors and real-time market alerts"},
    "feature.kpi_tracking": {"ar": "مؤشرات الأداء KPIs", "en": "KPI Tracking"},
    "feature.kpi_tracking_desc": {"ar": "تتبع مؤشرات أداء المشروع مع رسوم بيانية وتقارير", "en": "Track project KPIs with charts and reports"},
    "feature.project_roadmap": {"ar": "خارطة طريق المشروع", "en": "Project Roadmap"},
    "feature.project_roadmap_desc": {"ar": "معالم ومهام مع تتبع التقدم والإنجاز", "en": "Milestones and tasks with progress tracking"},
    "feature.role_dashboards": {"ar": "لوحات تحكم حسب الدور", "en": "Role-Based Dashboards"},
    "feature.role_dashboards_desc": {"ar": "لوحة مخصصة لكل دور: صاحب فكرة، مصنع، مدير", "en": "Custom dashboard for each role: entrepreneur, factory, admin"},

    # -- Landing Page Features: AI Intelligence --
    "feature.business_advisor": {"ar": "مستشار الأعمال الذكي", "en": "AI Business Advisor"},
    "feature.business_advisor_desc": {"ar": "مستشار أعمال ذكي تفاعلي يجيب عن أسئلتك", "en": "An interactive AI business advisor to answer your questions"},
    "feature.competitor_intelligence": {"ar": "تحليل المنافسين", "en": "Competitor Intelligence"},
    "feature.competitor_intelligence_desc": {"ar": "تحليل مواقع المنافسين الفعلية عبر Web Scraping", "en": "Analyze actual competitor websites via Web Scraping"},
    "feature.legal_advisor": {"ar": "المستشار القانوني الذكي", "en": "AI Legal Advisor"},
    "feature.legal_advisor_desc": {"ar": "تحليل المتطلبات القانونية والتراخيص لكل بلد", "en": "Analyze legal requirements and licenses for each country"},
    "feature.investor_matching": {"ar": "مطابقة المستثمرين", "en": "Investor Matching"},
    "feature.investor_matching_desc": {"ar": "اقتراح مستثمرين مناسبين حسب المجال والمرحلة", "en": "Suggest suitable investors based on industry and stage"},
    "feature.user_stories": {"ar": "قصص المستخدمين والشخصيات", "en": "User Stories & Personas"},
    "feature.user_stories_desc": {"ar": "ملفات عملاء مفصلة لتوجيه التسويق", "en": "Detailed customer profiles to guide marketing"},
    "feature.progress_tracker": {"ar": "متتبع التقدم", "en": "Progress Tracker"},
    "feature.progress_tracker_desc": {"ar": "خطة تنفيذ بخطوات مع تتبع الإنجاز", "en": "An implementation plan with steps and progress tracking"},

    # -- Landing Page Features: Saudi Market --
    "feature.saudi_incorporation": {"ar": "تأسيس شركة بالسعودية", "en": "Company Incorporation in Saudi Arabia"},
    "feature.saudi_incorporation_desc": {"ar": "استعلام WATHQ + استشارة قانونية AI لفتح سجل تجاري", "en": "WATHQ query + AI legal consultation to open a commercial register"},
    "feature.saudi_incubators": {"ar": "حاضنات الأعمال", "en": "Business Incubators"},
    "feature.saudi_incubators_desc": {"ar": "تقدم لحاضنات (الغرفة التجارية وغيرها) مباشرة من المنصة", "en": "Apply to incubators (Chamber of Commerce, etc.) directly from the platform"},
    "feature.vision_2030": {"ar": "تحليل رؤية 2030", "en": "Vision 2030 Analysis"},
    "feature.vision_2030_desc": {"ar": "مدى توافق مشروعك مع رؤية السعودية 2030", "en": "How your project aligns with Saudi Vision 2030"},
    "feature.saudi_regulations": {"ar": "تراخيص وأنظمة", "en": "Licenses and Regulations"},
    "feature.saudi_regulations_desc": {"ar": "تحليل تراخيص السعودية والإمارات ومتطلباتها", "en": "Analysis of licenses and regulations in Saudi Arabia and the UAE"},
    "feature.local_templates": {"ar": "قوالب القطاعات المحلية", "en": "Local Sector Templates"},
    "feature.local_templates_desc": {"ar": "مطاعم، عقارات، تقنية، تجارة إلكترونية", "en": "Restaurants, real estate, technology, e-commerce"},
    "feature.website_builder": {"ar": "منشئ المواقع", "en": "Website Builder"},
    "feature.website_builder_desc": {"ar": "إنشاء موقع لمشروعك مع ربط دومين خاص", "en": "Create a website for your project with a custom domain"},

    # -- Landing Page Features: Platform Features --
    "feature.2fa": {"ar": "المصادقة الثنائية", "en": "2FA Authentication"},
    "feature.2fa_desc": {"ar": "مصادقة ثنائية عبر Google Authenticator", "en": "Two-factor authentication via Google Authenticator"},
    "feature.email_verification": {"ar": "التحقق من البريد الإلكتروني", "en": "Email Verification"},
    "feature.email_verification_desc": {"ar": "تحقق من البريد الإلكتروني عند التسجيل", "en": "Email verification upon registration"},
    "feature.dark_light_mode": {"ar": "الوضع الداكن والفاتح", "en": "Dark/Light Mode"},
    "feature.dark_light_mode_desc": {"ar": "تبديل بين الوضع الداكن والفاتح", "en": "Switch between dark and light modes"},
    "feature.onboarding": {"ar": "جولة تعريفية", "en": "Onboarding Tour"},
    "feature.onboarding_desc": {"ar": "جولة تعريفية للمستخدمين الجدد", "en": "An onboarding tour for new users"},
    "feature.notifications": {"ar": "الإشعارات", "en": "Notifications"},
    "feature.notifications_desc": {"ar": "نظام إشعارات داخل التطبيق", "en": "In-app notification system"},
    "feature.api_marketplace": {"ar": "سوق API للمطورين", "en": "API Marketplace"},
    "feature.api_marketplace_desc": {"ar": "وصول برمجي كامل للمطورين مع مفاتيح API", "en": "Full programmatic access for developers with API keys"},
    "feature.bilingual": {"ar": "دعم لغتين (عربي/إنجليزي)", "en": "Bilingual AR/EN"},
    "feature.bilingual_desc": {"ar": "دعم كامل للعربية والإنجليزية", "en": "Full support for Arabic and English"},
    "feature.stripe": {"ar": "اشتراكات Stripe", "en": "Stripe Subscriptions"},
    "feature.stripe_desc": {"ar": "3 خطط اشتراك: Free, Pro, Enterprise", "en": "3 subscription plans: Free, Pro, Enterprise"},

    # -- Landing Page Features: Investor & Startup Tools --
    "feature.investor_crm": {"ar": "إدارة علاقات المستثمرين", "en": "Investor CRM"},
    "feature.investor_crm_desc": {"ar": "إدارة علاقات المستثمرين مع خط أنابيب (Pipeline) كامل", "en": "Manage investor relations with a full pipeline"},
    "feature.grant_finder": {"ar": "البحث عن المنح والتمويل", "en": "Grant & Funding Finder"},
    "feature.grant_finder_desc": {"ar": "8+ منح خليجية حقيقية + مطابقة ذكية بالـ AI", "en": "8+ real Gulf grants + smart AI matching"},
    "feature.cofounder_matching": {"ar": "مطابقة الشريك المؤسس", "en": "Co-Founder Matching"},
    "feature.cofounder_matching_desc": {"ar": "ابحث عن شريك مؤسس حسب المهارات والاهتمامات", "en": "Find a co-founder based on skills and interests"},
    "feature.valuation": {"ar": "تقييم الشركات الناشئة", "en": "Startup Valuation"},
    "feature.valuation_desc": {"ar": "تقييم بـ 4 طرق: DCF, Comparable, Scorecard, Berkus", "en": "Valuation by 4 methods: DCF, Comparable, Scorecard, Berkus"},
    "feature.pitch_rehearsal": {"ar": "التدريب على العرض الاستثماري", "en": "AI Pitch Rehearsal"},
    "feature.pitch_rehearsal_desc": {"ar": "تدريب العرض الاستثماري مع تقييم 6 معايير", "en": "Pitch rehearsal with evaluation on 6 criteria"},
    "feature.pitch_simulator": {"ar": "محاكي العرض التقديمي التفاعلي", "en": "Interactive Pitch Simulator"},
    "feature.pitch_simulator_desc": {"ar": "محاكاة مقابلة مستثمر حقيقي بأسئلة صعبة", "en": "Simulate a real investor meeting with tough questions"},
    "feature.studies_marketplace": {"ar": "سوق دراسات الجدوى", "en": "Studies Marketplace"},
    "feature.studies_marketplace_desc": {"ar": "سوق لبيع وشراء دراسات الجدوى الجاهزة", "en": "A marketplace to buy and sell ready-made feasibility studies"},
    "feature.meeting_scheduler": {"ar": "جدولة الاجتماعات", "en": "Meeting Scheduler"},
    "feature.meeting_scheduler_desc": {"ar": "جدولة اجتماعات مع المستثمرين تلقائياً", "en": "Schedule meetings with investors automatically"},

    # -- Landing Page Features: Advanced AI --
    "feature.multi_language": {"ar": "دعم 7 لغات", "en": "Multi-Language (7 Languages)"},
    "feature.multi_language_desc": {"ar": "ترجمة التقرير للعربية، الإنجليزية، الفرنسية، التركية، الأردية، الإسبانية، والصينية", "en": "Translate reports to Arabic, English, French, Turkish, Urdu, Spanish, and Chinese"},
    "feature.auto_update": {"ar": "تحديث تلقائي بالذكاء الاصطناعي", "en": "AI Auto-Update"},
    "feature.auto_update_desc": {"ar": "تحديث التقرير تلقائياً مع أحدث بيانات السوق", "en": "Automatically update the report with the latest market data"},
    "feature.competitor_monitor": {"ar": "مراقبة المنافسين", "en": "Competitor Monitor"},
    "feature.competitor_monitor_desc": {"ar": "مراقبة أسبوعية تلقائية لمواقع المنافسين", "en": "Automatic weekly monitoring of competitor websites"},
    "feature.ai_search": {"ar": "بحث مدعوم بالذكاء الاصطناعي", "en": "AI-Powered Search"},
    "feature.ai_search_desc": {"ar": "بحث ذكي في تقاريرك باستخدام AI Semantic Search", "en": "Smart search in your reports using AI Semantic Search"},
    "feature.version_history": {"ar": "سجل إصدارات التقرير", "en": "Report Version History"},
    "feature.version_history_desc": {"ar": "حفظ نسخ من التقرير واسترجاعها", "en": "Save and restore versions of your report"},
    "feature.word_export": {"ar": "تصدير إلى Word .docx", "en": "Word .docx Export"},
    "feature.word_export_desc": {"ar": "تصدير كخطة عمل Word قابلة للتعديل", "en": "Export as an editable Word business plan"},
    "feature.weekly_digest": {"ar": "ملخص أسبوعي بالذكاء الاصطناعي", "en": "Weekly AI Digest"},
    "feature.weekly_digest_desc": {"ar": "ملخص أسبوعي ذكي لمشاريعك ومنافسيك", "en": "A smart weekly summary of your projects and competitors"},
    "feature.whitelabel_api": {"ar": "White-Label API", "en": "White-Label API"},
    "feature.whitelabel_api_desc": {"ar": "نسخ مخصصة بعلامتك التجارية مع API كامل", "en": "Custom branded versions with a full API"},

    # -- Landing Page Features: Automation & Integrations --
    "feature.zapier": {"ar": "تكامل مع Zapier", "en": "Zapier Integration"},
    "feature.zapier_desc": {"ar": "اربط Jadwa AI مع +5000 تطبيق عبر Zapier", "en": "Connect Jadwa AI with +5000 apps via Zapier"},
    "feature.n8n": {"ar": "n8n (استضافة ذاتية)", "en": "n8n (Self-Hosted)"},
    "feature.n8n_desc": {"ar": "أتمتة مفتوحة المصدر مع HMAC-SHA256 signing", "en": "Open-source automation with HMAC-SHA256 signing"},
    "feature.make": {"ar": "Make (Integromat)", "en": "Make (Integromat)"},
    "feature.make_desc": {"ar": "سيناريوهات أتمتة بصرية متقدمة", "en": "Advanced visual automation scenarios"},
    "feature.webhooks": {"ar": "Webhooks + 11 Event", "en": "Webhooks + 11 Events"},
    "feature.webhooks_desc": {"ar": "أحداث: تقرير، مستثمر، حملة، منافس، منحة — والمزيد", "en": "Events: report, investor, campaign, competitor, grant — and more"},

    # -- Landing Page Features: Project Management --
    "feature.kanban": {"ar": "لوحة كانبان", "en": "Kanban Board"},
    "feature.kanban_desc": {"ar": "لوحة مشاريع: فكرة → تحليل → تنفيذ → مكتمل", "en": "Project board: Idea → Analysis → Execution → Completed"},
    "feature.legal_generator": {"ar": "مولد المستندات القانونية", "en": "AI Legal Generator"},
    "feature.legal_generator_desc": {"ar": "8 مستندات قانونية: عقد تأسيس، NDA، شراكة، استثمار...", "en": "8 legal documents: articles of association, NDA, partnership, investment..."},
    "feature.financial_charts_interactive": {"ar": "رسوم مالية تفاعلية", "en": "Interactive Financial Charts"},
    "feature.financial_charts_interactive_desc": {"ar": "Chart.js تفاعلية: إيرادات، تكاليف، تدفقات، أرباح لـ 5 سنوات", "en": "Interactive Chart.js: revenue, costs, cash flow, profits for 5 years"},
    "feature.multi_currency_7": {"ar": "دعم 7 عملات", "en": "Multi-Currency (7 Currencies)"},
    "feature.multi_currency_7_desc": {"ar": "تحويل فوري: ريال، درهم، دولار، يورو، جنيه، دينار كويتي", "en": "Instant conversion: SAR, AED, USD, EUR, EGP, KWD"},
    "feature.custom_sections": {"ar": "أقسام تقرير مخصصة", "en": "Custom Report Sections"},
    "feature.custom_sections_desc": {"ar": "اختر 16 قسماً مخصصاً لتقريرك", "en": "Choose 16 custom sections for your report"},
    "feature.investor_portfolio": {"ar": "عرض محفظة المستثمر", "en": "Investor Portfolio View"},
    "feature.investor_portfolio_desc": {"ar": "عرض كل المشاريع المرتبطة بكل مستثمر", "en": "View all projects associated with each investor"},
    "feature.pdf_report_branding": {"ar": "علامة تجارية لتقرير PDF", "en": "PDF Report Branding"},
    "feature.pdf_report_branding_desc": {"ar": "شعارك وألوانك على غلاف تقرير PDF", "en": "Your logo and colors on the PDF report cover"},
    "feature.activity_feed": {"ar": "موجز نشاط الفريق", "en": "Team Activity Feed"},
    "feature.activity_feed_desc": {"ar": "خلاصة نشاط الفريق في الوقت الحقيقي", "en": "Real-time team activity feed"},


    # ── Common ──
    "common.save": {"ar": "حفظ", "en": "Save"},
    "common.cancel": {"ar": "إلغاء", "en": "Cancel"},
    "common.delete": {"ar": "حذف", "en": "Delete"},
    "common.edit": {"ar": "تعديل", "en": "Edit"},
    "common.loading": {"ar": "جاري التحميل...", "en": "Loading..."},
    "common.error": {"ar": "خطأ", "en": "Error"},
    "common.success": {"ar": "تم بنجاح", "en": "Success"},
    "common.back_to_report": {"ar": "العودة للتقرير", "en": "Back to Report"},
    "common.choose": {"ar": "اختر...", "en": "Choose..."},
    "common.type_answer": {"ar": "اكتب إجابتك...", "en": "Type your answer..."},
    "common.language": {"ar": "اللغة", "en": "Language"},
    "common.arabic": {"ar": "العربية", "en": "Arabic"},
    "common.english": {"ar": "English", "en": "English"},

    # ── Profile ──
    "profile.title": {"ar": "الملف الشخصي", "en": "Profile"},
    "profile.account_info": {"ar": "معلومات الحساب", "en": "Account Information"},
    "profile.language": {"ar": "لغة التقارير", "en": "Report Language"},
    "profile.currency": {"ar": "العملة", "en": "Currency"},
    "profile.change_password": {"ar": "تغيير كلمة المرور", "en": "Change Password"},
    "profile.current_password": {"ar": "كلمة المرور الحالية", "en": "Current Password"},
    "profile.new_password": {"ar": "كلمة المرور الجديدة", "en": "New Password"},
    "profile.2fa": {"ar": "المصادقة الثنائية (2FA)", "en": "Two-Factor Authentication (2FA)"},
    "profile.2fa_enabled": {"ar": "مفعّلة", "en": "Enabled"},
    "profile.2fa_protected": {"ar": "حسابك محمي بالمصادقة الثنائية", "en": "Your account is protected with 2FA"},
    "profile.2fa_desc": {"ar": "أضف طبقة حماية إضافية لحسابك عبر Google Authenticator", "en": "Add an extra layer of security via Google Authenticator"},
    "profile.enable_2fa": {"ar": "تفعيل 2FA", "en": "Enable 2FA"},
    "profile.disable_2fa": {"ar": "إلغاء 2FA", "en": "Disable 2FA"},
    "profile.verify_code": {"ar": "رمز التحقق", "en": "Verification Code"},
    "profile.subscription_info": {"ar": "معلومات الاشتراك", "en": "Subscription Info"},
    "profile.current_plan": {"ar": "الخطة الحالية", "en": "Current Plan"},
    "profile.free": {"ar": "مجاني", "en": "Free"},
    "profile.reports_this_month": {"ar": "تقارير هذا الشهر", "en": "Reports This Month"},
    "profile.created_at": {"ar": "تاريخ الإنشاء", "en": "Created At"},
    "profile.upgrade": {"ar": "ترقية الخطة", "en": "Upgrade Plan"},
    "profile.email_not_verified": {"ar": "بريدك الإلكتروني غير مؤكد.", "en": "Your email is not verified."},
    "profile.resend": {"ar": "إعادة الإرسال", "en": "Resend"},

    # ── Landing Feature Categories ──
    "landing.cat_ai": {"ar": "تحليلات AI متقدمة", "en": "Advanced AI Analytics"},
    "landing.cat_financial": {"ar": "التحليل المالي والرسوم البيانية", "en": "Financial Analysis & Charts"},
    "landing.cat_export": {"ar": "التصدير والعروض الاستثمارية", "en": "Export & Investor Presentations"},
    "landing.cat_marketing": {"ar": "التسويق بالذكاء الاصطناعي", "en": "AI Marketing"},
    "landing.cat_intelligence": {"ar": "الذكاء التنافسي والاستشارات", "en": "Competitive Intelligence & Advisory"},
    "landing.cat_saudi": {"ar": "خدمات السوق السعودي والعربي", "en": "Saudi & Arab Market Services"},
    "landing.cat_website": {"ar": "إنشاء المواقع والتواجد الرقمي", "en": "Website Builder & Digital Presence"},
    "landing.cat_investor": {"ar": "إدارة المستثمرين والتمويل", "en": "Investor Management & Funding"},
    "landing.cat_platform": {"ar": "مزايا المنصة", "en": "Platform Features"},
    "landing.cat_advanced_ai": {"ar": "مزايا AI متقدمة", "en": "Advanced AI Features"},
    "landing.cat_automation": {"ar": "الأتمتة والتكاملات", "en": "Automation & Integrations"},
    "landing.cat_project": {"ar": "إدارة المشاريع والمستندات", "en": "Project Management & Documents"},
    "landing.cat_prototyping": {"ar": "النماذج الأولية والتصنيع", "en": "Prototyping & Manufacturing"},
    "landing.cat_roles": {"ar": "نظام الأدوار والإشعارات", "en": "Roles & Notifications"},
    "landing.pricing_title": {"ar": "خطط الأسعار", "en": "Pricing Plans"},
    "landing.pricing_subtitle": {"ar": "ابدأ مجاناً، ثم ترقَّ حسب احتياجاتك", "en": "Start free, then upgrade as you grow"},
    "landing.most_popular": {"ar": "الأكثر شعبية", "en": "Most Popular"},
    "landing.free_forever": {"ar": "مجاناً للأبد", "en": "Free Forever"},
    "landing.for_entrepreneurs": {"ar": "لرواد الأعمال الجادين", "en": "For Serious Entrepreneurs"},
    "landing.for_companies": {"ar": "للشركات والمؤسسات", "en": "For Companies & Enterprises"},
    "landing.start_now": {"ar": "ابدأ الآن", "en": "Start Now"},
    "landing.contact_us": {"ar": "تواصل معنا", "en": "Contact Us"},
    "landing.per_month": {"ar": "/شهر", "en": "/mo"},

    # ── Flash Messages ──
    "flash.login_success": {"ar": "تم تسجيل الدخول بنجاح", "en": "Logged in successfully"},
    "flash.logout_success": {"ar": "تم تسجيل الخروج", "en": "Logged out successfully"},
    "flash.register_success": {"ar": "تم إنشاء الحساب بنجاح", "en": "Account created successfully"},
    "flash.profile_updated": {"ar": "تم تحديث الملف الشخصي", "en": "Profile updated successfully"},
    "flash.password_changed": {"ar": "تم تغيير كلمة المرور", "en": "Password changed successfully"},
    "flash.invalid_credentials": {"ar": "بيانات الدخول غير صحيحة", "en": "Invalid credentials"},
    "flash.email_exists": {"ar": "البريد الإلكتروني مسجل مسبقاً", "en": "Email already registered"},
    "flash.registration_disabled": {"ar": "عذراً، التسجيل الجديد معطل حالياً. يرجى التواصل مع الإدارة.", "en": "Sorry, new registrations are currently disabled. Please contact administration."},
    "flash.password_mismatch": {"ar": "كلمات المرور غير متطابقة", "en": "Passwords do not match"},
    "flash.study_created": {"ar": "تم إنشاء الدراسة بنجاح", "en": "Study created successfully"},
    "flash.study_deleted": {"ar": "تم حذف الدراسة", "en": "Study deleted"},
    "flash.study_duplicated": {"ar": "تم نسخ الدراسة", "en": "Study duplicated"},
    "flash.error_generic": {"ar": "حدث خطأ. حاول مرة أخرى.", "en": "An error occurred. Please try again."},
    "flash.unauthorized": {"ar": "غير مصرح لك بالوصول", "en": "Unauthorized access"},
    "flash.saved": {"ar": "تم الحفظ بنجاح", "en": "Saved successfully"},
    "flash.deleted": {"ar": "تم الحذف بنجاح", "en": "Deleted successfully"},
    "flash.login_required": {"ar": "يرجى تسجيل الدخول أولاً", "en": "Please log in first"},
    "flash.language_changed": {"ar": "تم تغيير اللغة", "en": "Language changed"},
    "flash.all_fields_required": {"ar": "جميع الحقول مطلوبة", "en": "All fields are required"},
    "flash.password_too_short": {"ar": "كلمة المرور يجب أن تكون 8 أحرف على الأقل", "en": "Password must be at least 8 characters"},
    "flash.wrong_password": {"ar": "كلمة المرور الحالية غير صحيحة", "en": "Current password is incorrect"},
    "flash.report_limit": {"ar": "لقد وصلت للحد الأقصى من التقارير الشهرية. يرجى ترقية خطتك.", "en": "You have reached your monthly report limit. Please upgrade your plan."},

    # ── Landing Page: Problem Section ──
    "landing.problem_title": {"ar": "التحديات الحقيقية التي تواجهك", "en": "Real Challenges You Face"},
    "landing.problem_subtitle": {"ar": "هل واجهت أحد هذه التحديات؟", "en": "Have you faced any of these challenges?"},
    "landing.problem_1_title": {"ar": "دراسات جدوى مكلفة ومطولة", "en": "Expensive & Time-Consuming Studies"},
    "landing.problem_1_desc": {"ar": "دراسات جدوى تقليدية تكلف آلاف الريالات وتستغرق أسابيع من البحث والتحليل", "en": "Traditional feasibility studies cost thousands and take weeks of research and analysis"},
    "landing.problem_2_title": {"ar": "صعوبة إقناع المستثمرين", "en": "Difficulty Convincing Investors"},
    "landing.problem_2_desc": {"ar": "بيانات غير مدعومة ونماذج ضعيفة تجعل من الصعب الحصول على تمويل", "en": "Unsupported data and weak models make it hard to secure funding"},
    "landing.problem_3_title": {"ar": "غياب رؤية 2030", "en": "Missing Vision 2030 Alignment"},
    "landing.problem_3_desc": {"ar": "عدم معرفة كيف يتوافق مشروعك مع أهداف رؤية السعودية 2030", "en": "Not knowing how your project aligns with Saudi Vision 2030 goals"},
    "landing.problem_4_title": {"ar": "تشتت الأدوات والمنصات", "en": "Scattered Tools & Platforms"},
    "landing.problem_4_desc": {"ar": "أدوات متعددة لكل شيء — دراسات، مالية، تسويق، إدارة مستثمرين", "en": "Multiple tools for everything — studies, finance, marketing, investor management"},

    # ── Landing Page: Solution Section ──
    "landing.solution_title": {"ar": "JadwaAI: الحل الشامل", "en": "JadwaAI: The Complete Solution"},
    "landing.solution_subtitle": {"ar": "منصة واحدة تجمع كل ما تحتاجه لتحويل فكرتك إلى واقع", "en": "One platform with everything you need to turn your idea into reality"},
    "landing.solution_1_title": {"ar": "دراسات جدوى احترافية في دقائق", "en": "Professional Studies in Minutes"},
    "landing.solution_1_desc": {"ar": "تقرير شامل بـ 12 محرك تحليل يعمل بالتوازي: سوقي، مالي، تنافسي، قانوني", "en": "Comprehensive report with 12 parallel analysis engines: market, financial, competitive, legal"},
    "landing.solution_2_title": {"ar": "تقارير جاهزة للمستثمرين", "en": "Investor-Ready Reports"},
    "landing.solution_2_desc": {"ar": "PDF احترافي + Pitch Deck + فيديو تسويقي — كل ما تحتاجه لإقناع المستثمرين", "en": "Professional PDF + Pitch Deck + Marketing Video — everything to convince investors"},
    "landing.solution_3_title": {"ar": "متكامل مع رؤية 2030", "en": "Integrated with Vision 2030"},
    "landing.solution_3_desc": {"ar": "تحليل مباشر لتوافق مشروعك مع أهداف رؤية السعودية 2030 والقطاعات المستهدفة", "en": "Instant analysis of your project's alignment with Saudi Vision 2030 and target sectors"},
    "landing.solution_4_title": {"ar": "من الفكرة إلى التمويل", "en": "From Idea to Funding"},
    "landing.solution_4_desc": {"ar": "أدوات كاملة: دراسة جدوى → مستشار ذكي → إدارة مستثمرين → تسويق آلي", "en": "Complete tools: feasibility study → AI advisor → investor management → automated marketing"},

    # ── Landing Page: For Investors Section ──
    "landing.investors_title": {"ar": "للمستثمرين", "en": "For Investors"},
    "landing.investors_subtitle": {"ar": "اتخذ قرارات استثمارية مدروسة ببيانات دقيقة", "en": "Make informed investment decisions with accurate data"},
    "landing.investors_1_title": {"ar": "محفظة استثمارية شاملة", "en": "Comprehensive Portfolio"},
    "landing.investors_1_desc": {"ar": "إدارة كل مشاريعك مع تقييم ذكي لكل مشروع ودرجة المخاطرة", "en": "Manage all your projects with smart ratings and risk assessment for each"},
    "landing.investors_2_title": {"ar": "مقارنة جانبية للمشاريع", "en": "Side-by-Side Comparison"},
    "landing.investors_2_desc": {"ar": "قارن بين المشاريع المتاحة وإحصل على تقرير تفصيلي للمقارنة", "en": "Compare available projects and get a detailed comparison report"},
    "landing.investors_3_title": {"ar": "تحليل مالي واستراتيجي", "en": "Financial & Strategic Analysis"},
    "landing.investors_3_desc": {"ar": "تقارير مالية تفاعلية مع رسوم بيانية وتوقعات للأرباح لـ 5 سنوات", "en": "Interactive financial reports with charts and 5-year profit forecasts"},
    "landing.investors_4_title": {"ar": "إشعارات ذكية للفرص", "en": "Smart Opportunity Alerts"},
    "landing.investors_4_desc": {"ar": "احصل على تنبيهات فورية عند وجود مشاريع جديدة تتوافق مع معاييرك", "en": "Get instant alerts when new projects match your criteria"},

    # ── Landing Page: For Government Section ──
    "landing.gov_title": {"ar": "للجهات الحكومية والرسمية", "en": "For Government & Official Entities"},
    "landing.gov_subtitle": {"ar": "أدعم رؤية 2030 ببيانات دقيقة وقرارات مبنية على الأدلة", "en": "Support Vision 2030 with accurate data and evidence-based decisions"},
    "landing.gov_1_title": {"ar": "تحليل اقتصادي شامل", "en": "Comprehensive Economic Analysis"},
    "landing.gov_1_desc": {"ar": "تحليل القطاعات المختلفة وتقييم الفرص الاستثمارية في المملكة", "en": "Analyze different sectors and assess investment opportunities in the Kingdom"},
    "landing.gov_2_title": {"ar": "قياس أثر المبادرات", "en": "Impact Measurement"},
    "landing.gov_2_desc": {"ar": "قيس أثر المبادرات الحكومية على الاقتصاد والمجتمع", "en": "Measure the impact of government initiatives on economy and society"},
    "landing.gov_3_title": {"ar": "تقييم الجدوى للمشاريع", "en": "Feasibility Assessment"},
    "landing.gov_3_desc": {"ar": "تقييم شامل للمشاريع المقترحة مع توصيات مفصلة", "en": "Comprehensive assessment of proposed projects with detailed recommendations"},
    "landing.gov_4_title": {"ar": "تقارير مخصصة", "en": "Customized Reports"},
    "landing.gov_4_desc": {"ar": "تقارير قابلة للتخصيص حسب الجهة مع إمكانية التصدير بـ PDF", "en": "Customizable reports by entity with PDF export capability"},

    # ── Landing Page: Credibility/Stats Section ──
    "landing.stats_title": {"ar": "أرقام تتحدث عنا", "en": "Numbers That Speak"},
    "landing.stats_subtitle": {"ar": "ثق بآلاف رواد الأعمال والمستثمرين الذين يثقون بـ JadwaAI", "en": "Trusted by thousands of entrepreneurs and investors who rely on JadwaAI"},
    "landing.stats_studies_label": {"ar": "دراسة جدوى منشأة", "en": "Feasibility Studies Created"},
    "landing.stats_projects_label": {"ar": "مشروع نشط", "en": "Active Projects"},
    "landing.stats_reports_label": {"ar": "تقرير تم تصديره", "en": "Reports Exported"},
    "landing.stats_users_label": {"ar": "مستخدم نشط", "en": "Active Users"},
    "landing.stats_sponsor": {"ar": "برعاية", "en": "Sponsored by"},

    # ── Landing Page: New Hero Content ──
    "landing.hero_tagline": {"ar": "دراسات جدوى | تحليل سوق | دعم المستثمرين", "en": "Feasibility Studies | Market Analysis | Investor Support"},
    "landing.hero_features_note": {"ar": "+90 ميزة ذكية • مرتبطة برؤية 2030", "en": "+90 Smart Features • Aligned with Vision 2030"},
    "landing.hero_demo_btn": {"ar": "شاهد العرض التوضيحي", "en": "Watch Demo"},

    # ── Landing Page: New CTA Section ──
    "landing.cta_main_title": {"ar": "ابدأ رحلتك اليوم", "en": "Start Your Journey Today"},
    "landing.cta_main_subtitle": {"ar": "دراسة جدوى مجانية أولى • لا حاجة لبطاقة ائتمان", "en": "First feasibility study free • No credit card required"},
    "landing.cta_demo_button": {"ar": "احجز عرض توضيحي", "en": "Book a Demo"},

    # ── Landing Page: Trust Badges ──
    "landing.trust_title": {"ar": "موثوق من قادة الصناعة", "en": "Trusted by Industry Leaders"},
    "landing.trust_subtitle": {"ar": "انضم لآلاف الرواد والمستثمرين والجهات الحكومية", "en": "Join thousands of entrepreneurs, investors, and government entities"},

        "landing.sponsors_title": {"ar": "شركاء النجاح والرعاة", "en": "Success Stories & Sponsors"},
    "landing.stats_users_label": {"ar": "مستخدم نشط", "en": "Active Users"},
    "landing.stats_sponsors_label": {"ar": "راعي", "en": "Sponsors"},
    "landing.stats_organizations_label": {"ar": "منظمة", "en": "Organization"},

# ── Contact Page ──
    "contact.title": {"ar": "تواصل معنا", "en": "Contact Us"},
    "contact.subtitle": {"ar": "نحن هنا لمساعدتك. تواصل معنا عبر أي من الطرق التالية", "en": "We're here to help. Reach out to us through any of the following channels"},
    "contact.email": {"ar": "البريد الإلكتروني", "en": "Email"},
    "contact.phone": {"ar": "الهاتف", "en": "Phone"},
    "contact.cta_title": {"ar": "هل أنت مستعد للبدء؟", "en": "Ready to Get Started?"},
    "contact.cta_subtitle": {"ar": "أنشئ حسابك المجاني اليوم وابدأ رحلتك مع JadwaAI", "en": "Create your free account today and start your journey with JadwaAI"},
    "contact.back_home": {"ar": "العودة للصفحة الرئيسية", "en": "Back to Home"},
}

def get_lang(user=None):
    """Get current language from user preference or session."""
    from flask import session
    from flask_login import current_user
    if user:
        return getattr(user, "language_pref", "ar") or "ar"
    try:
        if current_user and current_user.is_authenticated:
            return getattr(current_user, "language_pref", "ar") or "ar"
    except Exception:
        pass
    return session.get("lang", "ar")


def _(key, lang=None):
    """Translate a key to the current language."""
    if lang is None:
        lang = get_lang()
    entry = TRANSLATIONS.get(key)
    if entry:
        return entry.get(lang, entry.get("ar", key))
    return key


def flash_i18n(key, category="info"):
    """Flash a translated message using the user's language preference."""
    from flask import flash
    flash(_(key), category)


# ── Flash Messages ──
FLASH_TRANSLATIONS = {
    "flash.login_success": {"ar": "تم تسجيل الدخول بنجاح", "en": "Logged in successfully"},
    "flash.logout_success": {"ar": "تم تسجيل الخروج", "en": "Logged out successfully"},
    "flash.register_success": {"ar": "تم إنشاء الحساب بنجاح", "en": "Account created successfully"},
    "flash.profile_updated": {"ar": "تم تحديث الملف الشخصي", "en": "Profile updated successfully"},
    "flash.password_changed": {"ar": "تم تغيير كلمة المرور", "en": "Password changed successfully"},
    "flash.invalid_credentials": {"ar": "بيانات الدخول غير صحيحة", "en": "Invalid credentials"},
    "flash.email_exists": {"ar": "البريد الإلكتروني مسجل مسبقاً", "en": "Email already registered"},
    "flash.registration_disabled": {"ar": "عذراً، التسجيل الجديد معطل حالياً. يرجى التواصل مع الإدارة.", "en": "Sorry, new registrations are currently disabled. Please contact administration."},
    "flash.password_mismatch": {"ar": "كلمات المرور غير متطابقة", "en": "Passwords do not match"},
    "flash.study_created": {"ar": "تم إنشاء الدراسة بنجاح", "en": "Study created successfully"},
    "flash.study_deleted": {"ar": "تم حذف الدراسة", "en": "Study deleted"},
    "flash.study_duplicated": {"ar": "تم نسخ الدراسة", "en": "Study duplicated"},
    "flash.error_generic": {"ar": "حدث خطأ. حاول مرة أخرى.", "en": "An error occurred. Please try again."},
    "flash.unauthorized": {"ar": "غير مصرح لك بالوصول", "en": "Unauthorized access"},
    "flash.saved": {"ar": "تم الحفظ بنجاح", "en": "Saved successfully"},
    "flash.deleted": {"ar": "تم الحذف بنجاح", "en": "Deleted successfully"},
    "flash.login_required": {"ar": "يرجى تسجيل الدخول أولاً", "en": "Please log in first"},
    "flash.language_changed": {"ar": "تم تغيير اللغة", "en": "Language changed"},
    "flash.all_fields_required": {"ar": "جميع الحقول مطلوبة", "en": "All fields are required"},
    "flash.password_too_short": {"ar": "كلمة المرور يجب أن تكون 8 أحرف على الأقل", "en": "Password must be at least 8 characters"},
    "flash.wrong_password": {"ar": "كلمة المرور الحالية غير صحيحة", "en": "Current password is incorrect"},
    "flash.report_limit": {"ar": "لقد وصلت للحد الأقصى من التقارير الشهرية. يرجى ترقية خطتك.", "en": "You have reached your monthly report limit. Please upgrade your plan."},
    "flash.use_google_login": {"ar": "هذا الحساب مسجل باستخدام Google. يرجى تسجيل الدخول باستخدام Google.", "en": "This account is registered with Google. Please use Google login."},
}
TRANSLATIONS.update(FLASH_TRANSLATIONS)


def init_i18n(app):
    """Register i18n context processor with the Flask app."""
    @app.context_processor
    def inject_i18n():
        lang = get_lang()
        return {
            "_": lambda key: _(key, lang),
            "lang": lang,
            "dir": "rtl" if lang == "ar" else "ltr",
            "is_rtl": lang == "ar",
        }
