File size: 35,924 Bytes
06f81ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<!DOCTYPE html>
<html lang="en" class="h-full" data-theme="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Samanage Sentinel</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: {
                extend: {
                    colors: {
                        primary: {
                            50: '#f0f9ff',
                            100: '#e0f2fe',
                            200: '#bae6fd',
                            300: '#7dd3fc',
                            400: '#38bdf8',
                            500: '#0ea5e9',
                            600: '#0284c7',
                            700: '#0369a1',
                            800: '#075985',
                            900: '#0c4a6e',
                        },
                        dark: {
                            800: '#1e293b',
                            900: '#0f172a',
                        }
                    },
                    animation: {
                        'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
                    }
                }
            }
        }
    </script>
    <style>
        .sidebar-item.active {
            background-color: rgba(14, 165, 233, 0.1);
            border-left: 4px solid #0ea5e9;
        }
        .sidebar-item.active i {
            color: #0ea5e9;
        }
        .sidebar-item:hover:not(.active) {
            background-color: rgba(241, 245, 249, 0.5);
        }
        .dark .sidebar-item:hover:not(.active) {
            background-color: rgba(30, 41, 59, 0.5);
        }
        .card-hover:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .transition-all {
            transition-property: all;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
            transition-duration: 150ms;
        }
    </style>
</head>
<body class="h-full bg-gray-50 dark:bg-gray-900 transition-colors duration-300">
    <div class="flex h-full overflow-hidden">
        <!-- Sidebar -->
        <div class="hidden md:flex md:flex-shrink-0">
            <div class="flex flex-col w-64 h-full border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-dark-900">
                <div class="flex items-center justify-center h-16 px-4 border-b border-gray-200 dark:border-gray-700">
                    <div class="flex items-center">
                        <i data-feather="shield" class="text-primary-600 dark:text-primary-400 h-6 w-6"></i>
                        <span class="ml-2 text-xl font-bold text-gray-800 dark:text-white">Samanage</span>
                    </div>
                </div>
                <div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
                    <nav class="flex-1 space-y-2">
                        <a href="#" class="sidebar-item active flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="home" class="mr-3 h-5 w-5"></i>
                            Home
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="activity" class="mr-3 h-5 w-5"></i>
                            Dashboard
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="life-buoy" class="mr-3 h-5 w-5"></i>
                            Service Desk
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="hard-drive" class="mr-3 h-5 w-5"></i>
                            Assets
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="check-square" class="mr-3 h-5 w-5"></i>
                            Tasks
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="shopping-cart" class="mr-3 h-5 w-5"></i>
                            Procurement
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="alert-octagon" class="mr-3 h-5 w-5"></i>
                            Risk Management
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="bar-chart-2" class="mr-3 h-5 w-5"></i>
                            Analytics with AI
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="help-circle" class="mr-3 h-5 w-5"></i>
                            Help
                        </a>
                        <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                            <i data-feather="settings" class="mr-3 h-5 w-5"></i>
                            Setup
                        </a>
                    </nav>
                </div>
            </div>
        </div>

        <!-- Main content -->
        <div class="flex flex-col flex-1 overflow-hidden">
            <!-- Top navbar -->
            <div class="flex items-center justify-between h-16 px-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-dark-900">
                <div class="flex items-center">
                    <button class="md:hidden mr-2 text-gray-500 dark:text-gray-400">
                        <i data-feather="menu"></i>
                    </button>
                    <h1 class="text-lg font-semibold text-gray-800 dark:text-white">Dashboard</h1>
                </div>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-dark-800 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm w-64">
                        <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400 dark:text-gray-500 h-4 w-4"></i>
                    </div>
                    <button id="theme-toggle" class="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400">
                        <i data-feather="moon" id="theme-icon-dark" class="h-5 w-5 hidden"></i>
                        <i data-feather="sun" id="theme-icon-light" class="h-5 w-5"></i>
                    </button>
                    <button class="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400">
                        <i data-feather="bell"></i>
                    </button>
                    <div class="flex items-center">
                        <div class="h-8 w-8 rounded-full bg-primary-500 flex items-center justify-center text-white font-medium">JD</div>
                        <span class="ml-2 text-sm font-medium text-gray-700 dark:text-gray-200 hidden md:inline">John Doe</span>
                    </div>
                </div>
            </div>

            <!-- Mobile sidebar -->
            <div id="mobile-sidebar" class="fixed inset-0 z-40 hidden">
                <div class="absolute inset-0 bg-gray-600 bg-opacity-75" aria-hidden="true"></div>
                <div class="relative flex flex-col w-full max-w-xs h-full bg-white dark:bg-dark-900">
                    <div class="absolute top-0 right-0 -mr-12 pt-2">
                        <button type="button" class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
                            <span class="sr-only">Close sidebar</span>
                            <i data-feather="x" class="h-6 w-6 text-white"></i>
                        </button>
                    </div>
                    <div class="flex-shrink-0 flex items-center px-4 h-16 border-b border-gray-200 dark:border-gray-700">
                        <i data-feather="shield" class="text-primary-600 dark:text-primary-400 h-6 w-6"></i>
                        <span class="ml-2 text-xl font-bold text-gray-800 dark:text-white">Samanage</span>
                    </div>
                    <div class="flex-1 flex flex-col overflow-y-auto">
                        <nav class="flex-1 px-2 py-4 space-y-2">
                            <a href="#" class="sidebar-item active flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="home" class="mr-3 h-5 w-5"></i>
                                Home
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="activity" class="mr-3 h-5 w-5"></i>
                                Dashboard
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="life-buoy" class="mr-3 h-5 w-5"></i>
                                Service Desk
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="hard-drive" class="mr-3 h-5 w-5"></i>
                                Assets
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="check-square" class="mr-3 h-5 w-5"></i>
                                Tasks
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="shopping-cart" class="mr-3 h-5 w-5"></i>
                                Procurement
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="alert-octagon" class="mr-3 h-5 w-5"></i>
                                Risk Management
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="bar-chart-2" class="mr-3 h-5 w-5"></i>
                                Analytics with AI
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="help-circle" class="mr-3 h-5 w-5"></i>
                                Help
                            </a>
                            <a href="#" class="sidebar-item flex items-center px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-300">
                                <i data-feather="settings" class="mr-3 h-5 w-5"></i>
                                Setup
                            </a>
                        </nav>
                    </div>
                </div>
            </div>

            <!-- Main content area -->
            <div class="flex-1 overflow-auto p-6 bg-gray-50 dark:bg-gray-900">
                <!-- Stats Cards -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
                    <div class="card-hover bg-white dark:bg-dark-800 rounded-lg shadow p-6 transition-all">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400">
                                <i data-feather="alert-triangle" class="h-6 w-6"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Open Incidents</p>
                                <p class="text-2xl font-semibold text-gray-800 dark:text-white">42</p>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex items-center text-sm text-blue-600 dark:text-blue-400">
                                <span>+2.5% from yesterday</span>
                                <i data-feather="arrow-up" class="ml-1 h-4 w-4"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-hover bg-white dark:bg-dark-800 rounded-lg shadow p-6 transition-all">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400">
                                <i data-feather="check-circle" class="h-6 w-6"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Resolved Today</p>
                                <p class="text-2xl font-semibold text-gray-800 dark:text-white">18</p>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex items-center text-sm text-green-600 dark:text-green-400">
                                <span>+15% from yesterday</span>
                                <i data-feather="arrow-up" class="ml-1 h-4 w-4"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-hover bg-white dark:bg-dark-800 rounded-lg shadow p-6 transition-all">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-yellow-100 dark:bg-yellow-900/30 text-yellow-600 dark:text-yellow-400">
                                <i data-feather="clock" class="h-6 w-6"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Avg. Resolution Time</p>
                                <p class="text-2xl font-semibold text-gray-800 dark:text-white">4.2h</p>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex items-center text-sm text-yellow-600 dark:text-yellow-400">
                                <span>-0.5h from last week</span>
                                <i data-feather="arrow-down" class="ml-1 h-4 w-4"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-hover bg-white dark:bg-dark-800 rounded-lg shadow p-6 transition-all">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400">
                                <i data-feather="bar-chart-2" class="h-6 w-6"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-500 dark:text-gray-400">SLA Compliance</p>
                                <p class="text-2xl font-semibold text-gray-800 dark:text-white">92%</p>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex items-center text-sm text-purple-600 dark:text-purple-400">
                                <span>+3% from last month</span>
                                <i data-feather="arrow-up" class="ml-1 h-4 w-4"></i>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Charts and Incident List -->
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
                    <!-- Incident Trend Chart -->
                    <div class="lg:col-span-2 bg-white dark:bg-dark-800 rounded-lg shadow p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Incident Trends</h2>
                            <div class="flex space-x-2">
                                <button class="px-3 py-1 text-xs font-medium rounded-lg bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400">Week</button>
                                <button class="px-3 py-1 text-xs font-medium rounded-lg bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300">Month</button>
                                <button class="px-3 py-1 text-xs font-medium rounded-lg bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300">Quarter</button>
                            </div>
                        </div>
                        <div class="h-80">
                            <canvas id="incidentTrendChart"></canvas>
                        </div>
                    </div>

                    <!-- Priority Distribution -->
                    <div class="bg-white dark:bg-dark-800 rounded-lg shadow p-6">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Priority Distribution</h2>
                        <div class="h-80">
                            <canvas id="priorityChart"></canvas>
                        </div>
                    </div>
                </div>

                <!-- Recent Incidents -->
                <div class="bg-white dark:bg-dark-800 rounded-lg shadow overflow-hidden">
                    <div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Recent Incidents</h2>
                    </div>
                    <div class="divide-y divide-gray-200 dark:divide-gray-700">
                        <!-- Incident 1 -->
                        <div class="px-6 py-4 hover:bg-gray-50 dark:hover:bg-gray-700/50">
                            <div class="flex items-center justify-between">
                                <div>
                                    <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">#INC-987654</a>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Unable to access company VPN</p>
                                </div>
                                <div class="flex items-center space-x-2">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-400">Critical</span>
                                    <span class="text-sm text-gray-500 dark:text-gray-400">Today, 10:30</span>
                                    <i data-feather="chevron-right" class="h-4 w-4 text-gray-400 dark:text-gray-500"></i>
                                </div>
                            </div>
                        </div>
                        <!-- Incident 2 -->
                        <div class="px-6 py-4 hover:bg-gray-50 dark:hover:bg-gray-700/50">
                            <div class="flex items-center justify-between">
                                <div>
                                    <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">#INC-987653</a>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Email server outage - inbound emails delayed</p>
                                </div>
                                <div class="flex items-center space-x-2">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-400">High</span>
                                    <span class="text-sm text-gray-500 dark:text-gray-400">Today, 09:15</span>
                                    <i data-feather="chevron-right" class="h-4 w-4 text-gray-400 dark:text-gray-500"></i>
                                </div>
                            </div>
                        </div>
                        <!-- Incident 3 -->
                        <div class="px-6 py-4 hover:bg-gray-50 dark:hover:bg-gray-700/50">
                            <div class="flex items-center justify-between">
                                <div>
                                    <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">#INC-987652</a>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Printer not working in Marketing department</p>
                                </div>
                                <div class="flex items-center space-x-2">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-400">Medium</span>
                                    <span class="text-sm text-gray-500 dark:text-gray-400">Today, 08:45</span>
                                    <i data-feather="chevron-right" class="h-4 w-4 text-gray-400 dark:text-gray-500"></i>
                                </div>
                            </div>
                        </div>
                        <!-- Incident 4 -->
                        <div class="px-6 py-4 hover:bg-gray-50 dark:hover:bg-gray-700/50">
                            <div class="flex items-center justify-between">
                                <div>
                                    <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">#INC-987651</a>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Request for new software license</p>
                                </div>
                                <div class="flex items-center space-x-2">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-400">Low</span>
                                    <span class="text-sm text-gray-500 dark:text-gray-400">Yesterday, 16:30</span>
                                    <i data-feather="chevron-right" class="h-4 w-4 text-gray-400 dark:text-gray-500"></i>
                                </div>
                            </div>
                        </div>
                        <!-- Incident 5 -->
                        <div class="px-6 py-4 hover:bg-gray-50 dark:hover:bg-gray-700/50">
                            <div class="flex items-center justify-between">
                                <div>
                                    <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">#INC-987650</a>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Password reset for accounting system</p>
                                </div>
                                <div class="flex items-center space-x-2">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-400">Info</span>
                                    <span class="text-sm text-gray-500 dark:text-gray-400">Yesterday, 15:20</span>
                                    <i data-feather="chevron-right" class="h-4 w-4 text-gray-400 dark:text-gray-500"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="px-6 py-3 bg-gray-50 dark:bg-gray-800 text-right">
                        <a href="#" class="text-sm font-medium text-primary-600 dark:text-primary-400 hover:underline">View all incidents</a>
                    </div>
                </div>

                <!-- AI Recommendations -->
                <div class="mt-6 bg-white dark:bg-dark-800 rounded-lg shadow overflow-hidden">
                    <div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white">AI Recommendations</h2>
                        <span class="px-2 py-1 text-xs font-medium rounded-full bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400 flex items-center">
                            <i data-feather="zap" class="h-3 w-3 mr-1"></i>
                            Powered by AI
                        </span>
                    </div>
                    <div class="divide-y divide-gray-200 dark:divide-gray-700">
                        <div class="px-6 py-4">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400">
                                    <i data-feather="trending-up" class="h-5 w-5"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-sm font-medium text-gray-800 dark:text-white">Increase in VPN-related incidents</h3>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">AI has detected a 45% increase in VPN access issues over the past week compared to the monthly average.</p>
                                    <div class="mt-2">
                                        <button class="text-xs font-medium text-primary-600 dark:text-primary-400 hover:underline">View analysis</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="px-6 py-4">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center text-green-600 dark:text-green-400">
                                    <i data-feather="clock" class="h-5 w-5"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-sm font-medium text-gray-800 dark:text-white">Resolution time improvement</h3>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">AI suggests implementing the new knowledge base could reduce resolution time by ~15% based on similar cases.</p>
                                    <div class="mt-2">
                                        <button class="text-xs font-medium text-primary-600 dark:text-primary-400 hover:underline">Learn more</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="px-6 py-4">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center text-yellow-600 dark:text-yellow-400">
                                    <i data-feather="users" class="h-5 w-5"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-sm font-medium text-gray-800 dark:text-white">Team workload alert</h3>
                                    <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">The AI has identified that 3 team members are handling 65% of high-priority incidents. Consider redistributing workload.</p>
                                    <div class="mt-2">
                                        <button class="text-xs font-medium text-primary-600 dark:text-primary-400 hover:underline">View distribution</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Initialize feather icons
        feather.replace();

        // Dark mode toggle
        const themeToggle = document.getElementById('theme-toggle');
        const themeIconDark = document.getElementById('theme-icon-dark');
        const themeIconLight = document.getElementById('theme-icon-light');
        
        themeToggle.addEventListener('click', () => {
            const html = document.documentElement;
            if (html.getAttribute('data-theme') === 'dark') {
                html.setAttribute('data-theme', 'light');
                themeIconDark.classList.add('hidden');
                themeIconLight.classList.remove('hidden');
                localStorage.setItem('theme', 'light');
            } else {
                html.setAttribute('data-theme', 'dark');
                themeIconLight.classList.add('hidden');
                themeIconDark.classList.remove('hidden');
                localStorage.setItem('theme', 'dark');
            }
        });

        // Check for saved theme preference
        if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            document.documentElement.setAttribute('data-theme', 'dark');
            themeIconLight.classList.add('hidden');
            themeIconDark.classList.remove('hidden');
        } else {
            document.documentElement.setAttribute('data-theme', 'light');
            themeIconDark.classList.add('hidden');
            themeIconLight.classList.remove('hidden');
        }

        // Mobile sidebar toggle
        document.querySelector('.md\\:hidden button').addEventListener('click', () => {
            document.getElementById('mobile-sidebar').classList.remove('hidden');
        });

        document.querySelector('#mobile-sidebar button').addEventListener('click', () => {
            document.getElementById('mobile-sidebar').classList.add('hidden');
        });

        // Sidebar navigation
        document.querySelectorAll('.sidebar-item').forEach(item => {
            item.addEventListener('click', function(e) {
                e.preventDefault();
                document.querySelectorAll('.sidebar-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
                
                // Close mobile sidebar if open
                document.getElementById('mobile-sidebar').classList.add('hidden');
            });
        });

        // Charts
        const incidentTrendCtx = document.getElementById('incidentTrendChart').getContext('2d');
        const incidentTrendChart = new Chart(incidentTrendCtx, {
            type: 'line',
            data: {
                labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
                datasets: [
                    {
                        label: 'New Incidents',
                        data: [12, 19, 15, 22, 18, 8, 10],
                        borderColor: '#0ea5e9',
                        backgroundColor: 'rgba(14, 165, 233, 0.1)',
                        tension: 0.3,
                        fill: true
                    },
                    {
                        label: 'Resolved Incidents',
                        data: [8, 12, 10, 14, 16, 6, 9],
                        borderColor: '#10b981',
                        backgroundColor: 'rgba(16, 185, 129, 0.1)',
                        tension: 0.3,
                        fill: true
                    }
                ]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'top',
                        labels: {
                            color: '#6b7280'
                        }
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            color: 'rgba(229, 231, 235, 0.3)'
                        },
                        ticks: {
                            color: '#6b7280'
                        }
                    },
                    x: {
                        grid: {
                            display: false
                        },
                        ticks: {
                            color: '#6b7280'
                        }
                    }
                }
            }
        });

        const priorityCtx = document.getElementById('priorityChart').getContext('2d');
        const priorityChart = new Chart(priorityCtx, {
            type: 'doughnut',
            data: {
                labels: ['Critical', 'High', 'Medium', 'Low', 'Info'],
                datasets: [{
                    data: [5, 12, 20, 15, 8],
                    backgroundColor: [
                        '#ef4444',
                        '#f59e0b',
                        '#3b82f6',
                        '#10b981',
                        '#9ca3af'
                    ],
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right',
                        labels: {
                            color: '#6b7280'
                        }
                    }
                },
                cutout: '70%'
            }
        });
    </script>
</body>
</html>