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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scaling Up Strategic Plan with AI</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        }
        .plan-section {
            transition: all 0.3s ease;
        }
        .plan-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }
        .ai-pulse {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
            100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
        }
    </style>
</head>
<body class="gradient-bg min-h-screen font-sans">
    <div class="container mx-auto px-4 py-12">
        <header class="text-center mb-12">
            <h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-4">Scaling Up Strategic Plan</h1>
            <p class="text-xl text-gray-600 max-w-3xl mx-auto">Your comprehensive roadmap for growth with AI-powered optimization</p>
        </header>

        <div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
            <!-- AI Assistant Panel -->
            <div class="bg-white rounded-xl shadow-lg p-6 ai-pulse col-span-1">
                <div class="flex items-center mb-4">
                    <i class="fas fa-robot text-blue-500 text-2xl mr-3"></i>
                    <h2 class="text-xl font-bold text-gray-800">AI Strategy Assistant</h2>
                </div>
                
                <div class="mb-4">
                    <label class="block text-gray-700 text-sm font-bold mb-2" for="api-key">
                        Enter your OpenAI API Key
                    </label>
                    <input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
                           id="api-key" type="password" placeholder="sk-...">
                    <p class="text-xs text-gray-500 mt-1">We don't store your API key. It's used only for your session.</p>
                </div>
                
                <div class="mb-4">
                    <label class="block text-gray-700 text-sm font-bold mb-2" for="ai-task">
                        What would you like help with?
                    </label>
                    <select class="shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="ai-task">
                        <option value="">Select an option</option>
                        <option value="vision">Refine company vision</option>
                        <option value="goals">Generate SMART goals</option>
                        <option value="kpis">Suggest relevant KPIs</option>
                        <option value="initiatives">Brainstorm initiatives</option>
                        <option value="risks">Identify potential risks</option>
                    </select>
                </div>
                
                <button onclick="generateAISuggestion()" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded w-full flex items-center justify-center">
                    <i class="fas fa-magic mr-2"></i> Generate Suggestion
                </button>
                
                <div id="ai-output" class="mt-4 p-4 bg-gray-50 rounded-lg hidden">
                    <h3 class="font-bold text-gray-800 mb-2">AI Suggestion:</h3>
                    <p id="ai-suggestion-text" class="text-gray-700"></p>
                    <button onclick="applySuggestion()" class="mt-2 bg-green-500 hover:bg-green-700 text-white font-bold py-1 px-3 rounded text-sm">
                        Apply Suggestion
                    </button>
                </div>
            </div>

            <!-- Main Plan Sections -->
            <div class="lg:col-span-2 space-y-6">
                <!-- Vision Section -->
                <div class="bg-white rounded-xl shadow-lg p-6 plan-section">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-eye text-purple-500 text-2xl mr-3"></i>
                        <h2 class="text-xl font-bold text-gray-800">Vision & Purpose</h2>
                    </div>
                    <div class="mb-4">
                        <label class="block text-gray-700 text-sm font-bold mb-2" for="vision">
                            Our Core Purpose (Why we exist)
                        </label>
                        <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
                                  id="vision" rows="2" placeholder="Our fundamental reason for being..."></textarea>
                    </div>
                    <div>
                        <label class="block text-gray-700 text-sm font-bold mb-2" for="future-state">
                            Future State (Where we're going)
                        </label>
                        <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
                                  id="future-state" rows="2" placeholder="Our aspirational future in 3-5 years..."></textarea>
                    </div>
                </div>

                <!-- Goals Section -->
                <div class="bg-white rounded-xl shadow-lg p-6 plan-section">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-bullseye text-red-500 text-2xl mr-3"></i>
                        <h2 class="text-xl font-bold text-gray-800">Strategic Goals</h2>
                    </div>
                    <div class="space-y-4" id="goals-container">
                        <div class="goal-item">
                            <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                                   placeholder="Specific, Measurable Goal">
                            <div class="flex justify-between">
                                <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                                    <option>1 Year</option>
                                    <option>3 Years</option>
                                    <option>5 Years</option>
                                </select>
                                <button onclick="removeGoal(this)" class="text-red-500 hover:text-red-700 text-sm">
                                    <i class="fas fa-trash"></i> Remove
                                </button>
                            </div>
                        </div>
                    </div>
                    <button onclick="addGoal()" class="mt-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Goal
                    </button>
                </div>
            </div>
        </div>

        <!-- Bottom Row -->
        <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
            <!-- KPIs Section -->
            <div class="bg-white rounded-xl shadow-lg p-6 plan-section">
                <div class="flex items-center mb-4">
                    <i class="fas fa-chart-line text-green-500 text-2xl mr-3"></i>
                    <h2 class="text-xl font-bold text-gray-800">Key Performance Indicators</h2>
                </div>
                <div class="space-y-4" id="kpis-container">
                    <div class="kpi-item">
                        <div class="flex">
                            <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mr-2" 
                                   placeholder="KPI Name">
                            <input type="text" class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
                                   placeholder="Target">
                        </div>
                        <div class="flex justify-between mt-2">
                            <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                                <option>Monthly</option>
                                <option>Quarterly</option>
                                <option>Annually</option>
                            </select>
                            <button onclick="removeKPI(this)" class="text-red-500 hover:text-red-700 text-sm">
                                <i class="fas fa-trash"></i> Remove
                            </button>
                        </div>
                    </div>
                </div>
                <button onclick="addKPI()" class="mt-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded flex items-center">
                    <i class="fas fa-plus mr-2"></i> Add KPI
                </button>
            </div>

            <!-- Initiatives Section -->
            <div class="bg-white rounded-xl shadow-lg p-6 plan-section">
                <div class="flex items-center mb-4">
                    <i class="fas fa-tasks text-yellow-500 text-2xl mr-3"></i>
                    <h2 class="text-xl font-bold text-gray-800">Key Initiatives</h2>
                </div>
                <div class="space-y-4" id="initiatives-container">
                    <div class="initiative-item">
                        <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                               placeholder="Initiative Name">
                        <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline text-sm mb-2" 
                                  rows="2" placeholder="Description"></textarea>
                        <div class="flex justify-between">
                            <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                                <option>Q1</option>
                                <option>Q2</option>
                                <option>Q3</option>
                                <option>Q4</option>
                            </select>
                            <button onclick="removeInitiative(this)" class="text-red-500 hover:text-red-700 text-sm">
                                <i class="fas fa-trash"></i> Remove
                            </button>
                        </div>
                    </div>
                </div>
                <button onclick="addInitiative()" class="mt-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded flex items-center">
                    <i class="fas fa-plus mr-2"></i> Add Initiative
                </button>
            </div>

            <!-- Risks Section -->
            <div class="bg-white rounded-xl shadow-lg p-6 plan-section">
                <div class="flex items-center mb-4">
                    <i class="fas fa-exclamation-triangle text-orange-500 text-2xl mr-3"></i>
                    <h2 class="text-xl font-bold text-gray-800">Risks & Mitigations</h2>
                </div>
                <div class="space-y-4" id="risks-container">
                    <div class="risk-item">
                        <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                               placeholder="Potential Risk">
                        <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline text-sm mb-2" 
                                  rows="2" placeholder="Mitigation Strategy"></textarea>
                        <div class="flex justify-end">
                            <button onclick="removeRisk(this)" class="text-red-500 hover:text-red-700 text-sm">
                                <i class="fas fa-trash"></i> Remove
                            </button>
                        </div>
                    </div>
                </div>
                <button onclick="addRisk()" class="mt-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded flex items-center">
                    <i class="fas fa-plus mr-2"></i> Add Risk
                </button>
            </div>
        </div>

        <!-- Export Button -->
        <div class="mt-12 text-center">
            <button onclick="exportPlan()" class="bg-blue-600 hover:bg-blue-800 text-white font-bold py-3 px-8 rounded-full text-lg flex items-center mx-auto">
                <i class="fas fa-file-export mr-3"></i> Export Strategic Plan
            </button>
        </div>
    </div>

    <script>
        // Add new goal
        function addGoal() {
            const container = document.getElementById('goals-container');
            const newGoal = document.createElement('div');
            newGoal.className = 'goal-item mt-4';
            newGoal.innerHTML = `
                <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                       placeholder="Specific, Measurable Goal">
                <div class="flex justify-between">
                    <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                        <option>1 Year</option>
                        <option>3 Years</option>
                        <option>5 Years</option>
                    </select>
                    <button onclick="removeGoal(this)" class="text-red-500 hover:text-red-700 text-sm">
                        <i class="fas fa-trash"></i> Remove
                    </button>
                </div>
            `;
            container.appendChild(newGoal);
        }

        // Remove goal
        function removeGoal(button) {
            button.closest('.goal-item').remove();
        }

        // Add new KPI
        function addKPI() {
            const container = document.getElementById('kpis-container');
            const newKPI = document.createElement('div');
            newKPI.className = 'kpi-item mt-4';
            newKPI.innerHTML = `
                <div class="flex">
                    <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mr-2" 
                           placeholder="KPI Name">
                    <input type="text" class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
                           placeholder="Target">
                </div>
                <div class="flex justify-between mt-2">
                    <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                        <option>Monthly</option>
                        <option>Quarterly</option>
                        <option>Annually</option>
                    </select>
                    <button onclick="removeKPI(this)" class="text-red-500 hover:text-red-700 text-sm">
                        <i class="fas fa-trash"></i> Remove
                    </button>
                </div>
            `;
            container.appendChild(newKPI);
        }

        // Remove KPI
        function removeKPI(button) {
            button.closest('.kpi-item').remove();
        }

        // Add new initiative
        function addInitiative() {
            const container = document.getElementById('initiatives-container');
            const newInitiative = document.createElement('div');
            newInitiative.className = 'initiative-item mt-4';
            newInitiative.innerHTML = `
                <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                       placeholder="Initiative Name">
                <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline text-sm mb-2" 
                          rows="2" placeholder="Description"></textarea>
                <div class="flex justify-between">
                    <select class="shadow border rounded py-1 px-2 text-gray-700 text-sm focus:outline-none focus:shadow-outline">
                        <option>Q1</option>
                        <option>Q2</option>
                        <option>Q3</option>
                        <option>Q4</option>
                    </select>
                    <button onclick="removeInitiative(this)" class="text-red-500 hover:text-red-700 text-sm">
                        <i class="fas fa-trash"></i> Remove
                    </button>
                </div>
            `;
            container.appendChild(newInitiative);
        }

        // Remove initiative
        function removeInitiative(button) {
            button.closest('.initiative-item').remove();
        }

        // Add new risk
        function addRisk() {
            const container = document.getElementById('risks-container');
            const newRisk = document.createElement('div');
            newRisk.className = 'risk-item mt-4';
            newRisk.innerHTML = `
                <input type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline mb-2" 
                       placeholder="Potential Risk">
                <textarea class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline text-sm mb-2" 
                          rows="2" placeholder="Mitigation Strategy"></textarea>
                <div class="flex justify-end">
                    <button onclick="removeRisk(this)" class="text-red-500 hover:text-red-700 text-sm">
                        <i class="fas fa-trash"></i> Remove
                    </button>
                </div>
            `;
            container.appendChild(newRisk);
        }

        // Remove risk
        function removeRisk(button) {
            button.closest('.risk-item').remove();
        }

        // Generate AI suggestion
        async function generateAISuggestion() {
            const apiKey = document.getElementById('api-key').value;
            const task = document.getElementById('ai-task').value;
            const vision = document.getElementById('vision').value;
            const futureState = document.getElementById('future-state').value;
            
            if (!apiKey) {
                alert('Please enter your OpenAI API key');
                return;
            }
            
            if (!task) {
                alert('Please select what you need help with');
                return;
            }
            
            const outputDiv = document.getElementById('ai-output');
            const suggestionText = document.getElementById('ai-suggestion-text');
            
            outputDiv.classList.remove('hidden');
            suggestionText.textContent = "Generating suggestion...";
            
            try {
                let prompt = "";
                
                switch(task) {
                    case 'vision':
                        prompt = `Based on the following information, suggest a refined company vision statement and future state description that is inspiring and clear. Current vision: ${vision}. Current future state: ${futureState}. Provide 2-3 options for each.`;
                        break;
                    case 'goals':
                        prompt = `Generate 3-5 SMART strategic goals that align with this vision: ${vision} and future state: ${futureState}. Make them specific, measurable, achievable, relevant, and time-bound.`;
                        break;
                    case 'kpis':
                        prompt = `Suggest 5-7 key performance indicators that would effectively measure progress toward achieving strategic goals aligned with this vision: ${vision}. For each KPI, suggest a realistic target.`;
                        break;
                    case 'initiatives':
                        prompt = `Brainstorm 4-6 strategic initiatives that would help achieve goals aligned with this vision: ${vision}. For each initiative, provide a brief description and suggest which quarter it should be implemented.`;
                        break;
                    case 'risks':
                        prompt = `Identify 3-5 potential risks that could hinder achieving strategic objectives aligned with this vision: ${vision}. For each risk, suggest a mitigation strategy.`;
                        break;
                }
                
                const response = await fetch('https://api.openai.com/v1/chat/completions', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': `Bearer ${apiKey}`
                    },
                    body: JSON.stringify({
                        model: "gpt-3.5-turbo",
                        messages: [{role: "user", content: prompt}],
                        temperature: 0.7
                    })
                });
                
                const data = await response.json();
                if (data.choices && data.choices[0].message.content) {
                    suggestionText.textContent = data.choices[0].message.content;
                } else {
                    suggestionText.textContent = "Sorry, I couldn't generate a suggestion. Please try again.";
                }
            } catch (error) {
                console.error('Error:', error);
                suggestionText.textContent = "Error generating suggestion. Please check your API key and try again.";
            }
        }

        // Apply AI suggestion
        function applySuggestion() {
            const task = document.getElementById('ai-task').value;
            const suggestion = document.getElementById('ai-suggestion-text').textContent;
            
            if (task === 'vision') {
                document.getElementById('vision').value = suggestion;
            } else if (task === 'future-state') {
                document.getElementById('future-state').value = suggestion;
            }
            // Note: For other sections, you would need more complex parsing logic
            // This is a simplified version for demonstration
            
            alert('Suggestion applied to the relevant section');
        }

        // Export plan
        function exportPlan() {
            // In a real implementation, this would generate a PDF or Word document
            alert('Strategic plan exported successfully!');
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=JayStormX8/scaling-performance-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>