-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorig_emp.html
More file actions
4351 lines (3822 loc) · 232 KB
/
Copy pathorig_emp.html
File metadata and controls
4351 lines (3822 loc) · 232 KB
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
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="theme-color" content="#10b981">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="IPEC Consulting">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/cropped-ipec-logo-32x32.png">
<link rel="apple-touch-icon" href="assets/images/ipec.jpg">
<meta name="description"
content="IPEC Employee Portal by IPEC Consulting & Sangeet Malhotra. Submit expense claims and track reimbursements efficiently and securely.">
<meta name="keywords" content="IPEC, Employee, Expense, Claims, Reimbursement, Sangeet Malhotra, IPEC Consulting">
<meta name="author" content="Sangeet Malhotra, IPEC Consulting">
<link rel="canonical" href="https://i.fouralpha.org/emp.html">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:title" content="Employee Portal - IPEC Expense Manager">
<meta property="og:description"
content="IPEC Employee Portal by IPEC Consulting & Sangeet Malhotra. Submit expense claims and track reimbursements efficiently and securely.">
<meta property="og:url" content="https://i.fouralpha.org/emp.html">
<meta property="og:image" content="https://i.fouralpha.org/assets/images/ipec.jpg">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="IPEC Employee Portal">
<meta name="twitter:description" content="Manage your corporate expenses efficiently.">
<meta name="twitter:image" content="https://i.fouralpha.org/assets/images/ipec.jpg">
<!-- Schema.org JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "IPEC Employee Portal",
"url": "https://i.fouralpha.org/emp.html",
"description": "Employee portal for expense submission and tracking.",
"applicationCategory": "FinanceApplication",
"operatingSystem": "Any",
"author": {
"@type": "Organization",
"name": "IPEC Consulting",
"url": "https://ipecconsulting.org"
}
}
</script>
<title>Employee Portal - IPEC Expense Manager | IPEC Consulting</title>
<script>
(function () {
const theme = localStorage.getItem('theme') || 'light';
if (theme === 'dark') document.documentElement.classList.add('dark');
else document.documentElement.classList.remove('dark');
})();
</script>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: { sans: ['Inter', 'sans-serif'] },
colors: {
slate: {
700: '#2F3336',
800: '#16181C',
900: '#000000'
},
brand: {
50: '#ecfdf5',
100: '#d1fae5',
200: '#a7f3d0',
300: '#6ee7b7',
400: '#34d399',
500: '#10b981',
600: '#059669',
700: '#047857',
800: '#065f46',
900: '#064e3b'
},
ipec: {
red: '#D93025',
green: '#1E8E3E',
dark: '#0F172A'
}
}
}
}
}
</script>
<script src="js/theme.js"></script>
<script src="js/utils.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
/* Theme Custom Cursors */
* {
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="%231E8E3E"/><stop offset="0.5" stop-color="%23F9AB00"/><stop offset="1" stop-color="%23D93025"/></linearGradient></defs><path d="M4 2.5l11 11.43-4.5 1.5 3.38 5.73-2.58 1.34-3.46-5.83-4.84 4.83Z" fill="url(%23g)" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>') 4 2, auto;
}
a,
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
select,
.cursor-pointer {
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><linearGradient id="p" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="%231E8E3E"/><stop offset="0.5" stop-color="%23F9AB00"/><stop offset="1" stop-color="%23D93025"/></linearGradient></defs><path d="M10.5 2a2 2 0 0 1 2 2v5a2 2 0 0 1 2-2h.5a2 2 0 0 1 2 2v2a2 2 0 0 1 2-2h.5a2 2 0 0 1 2 2v7.5a6.5 6.5 0 0 1-13 0V4a2 2 0 0 1 2-2z" fill="url(%23p)" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>') 10 2, pointer !important;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
.cursor-text {
cursor: text;
}
.cursor-not-allowed,
:disabled {
cursor: not-allowed !important;
}
</style>
<style type="text/tailwindcss">
body {
font-family: 'Inter', sans-serif;
background-color: #f8fafc;
color: #334155;
}
.card {
background: white;
border: 1px solid #e2e8f0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.card:hover {
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.glass-header {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(12px);
border-bottom: 1px solid #e2e8f0;
}
.input-field {
background: #f8fafc;
border: 1px solid #cbd5e1;
transition: all 0.2s;
color: #334155;
}
.input-field:focus {
background: white;
border-color: #10b981;
outline: none;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.dark .card {
background-color: #16181C;
border-color: #2F3336;
color: #f8fafc;
}
.dark .glass-header {
background: rgba(0, 0, 0, 0.92);
border-bottom: 1px solid #2F3336;
}
.dark .input-field {
background: #000000;
border-color: #2F3336;
color: #f1f5f9;
}
.dark .input-field:focus {
background: #16181C;
}
.badge {
padding: 2px 8px;
border-radius: 999px;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: slideUp 0.3s ease-out forwards;
}
/* Distinct Gradient Background */
/* Logo Gradient Text Effect */
.gradient-text {
background: linear-gradient(to right, #D93025, #F9AB00, #1E8E3E);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
/* Subtle Gradient Background for Hero */
.hero-bg {
background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(240, 249, 255, 1) 100%);
}
.dark .hero-bg {
background: #000000;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.dark ::-webkit-scrollbar-thumb {
background: #475569;
}
</style>
<link rel="manifest" href="manifest.json">
<script>
if ('serviceWorker' in navigator) window.addEventListener('load', () => navigator.serviceWorker.register('sw.js'));
if ('Notification' in window && Notification.permission === 'default') {
window.addEventListener('load', () => {
// Check if running on mobile view (width < 768px)
if (window.innerWidth < 768) {
setTimeout(() => {
Notification.requestPermission().then(perm => {
if (perm === 'granted') {
setTimeout(() => {
const title = "Test Notification";
const opts = {
body: "This is a test notification to confirm setup.",
icon: "assets/images/cropped-ipec-logo-32x32.png"
};
if (navigator.serviceWorker && navigator.serviceWorker.controller) {
navigator.serviceWorker.ready.then(reg => reg.showNotification(title, opts));
} else {
new Notification(title, opts);
}
}, 5000);
}
});
}, 3000);
}
});
}
</script>
</head>
<body
class="h-[100dvh] flex flex-col overflow-hidden text-slate-800 dark:text-slate-100 transition-colors duration-300 relative hero-bg">
<div id="toast-container" class="fixed top-5 right-5 z-50 flex flex-col gap-2"></div>
<!-- Auth Screen -->
<!-- Auth Screen -->
<div id="auth-screen" class="w-full h-[100dvh] overflow-y-auto relative flex flex-col">
<div class="w-full min-h-full flex flex-col items-center justify-start p-4 py-8 md:py-16 relative z-10">
<div
class="card p-6 md:p-8 rounded-2xl w-full max-w-md z-10 relative bg-white/90 dark:bg-slate-800/90 backdrop-blur mb-8 shadow-xl border border-slate-100 dark:border-slate-700">
<div class="text-center mb-8">
<div id="login-logo-container"
class="w-20 h-20 bg-gradient-to-br from-green-600 to-green-800 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg shadow-green-200 overflow-hidden">
<img id="login-logo-img" class="w-full h-full object-contain hidden"
src="assets/images/ipec.jpg" alt="Company Logo">
<i id="login-logo-fallback" class="fa-solid fa-seedling text-3xl text-white"></i>
</div>
<h1 class="text-2xl font-bold text-slate-800 dark:text-slate-100" id="login-company-name">IPEC
Expense Manager
</h1>
<p class="text-slate-500 dark:text-slate-400 text-sm mt-1">Sign in to manage your corporate expenses
</p>
</div>
<form id="login-form" class="space-y-4">
<div>
<label
class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Corporate
Email</label>
<div class="relative">
<i class="fa-solid fa-envelope absolute left-3 top-3.5 text-slate-400"></i>
<input type="email" id="login-email"
class="input-field w-full rounded-lg py-3 pl-10 pr-4 text-sm"
placeholder="employee@company.com" autocomplete="username" required>
</div>
</div>
<div>
<label
class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Password</label>
<div class="relative">
<i class="fa-solid fa-lock absolute left-3 top-3.5 text-slate-400"></i>
<input type="password" id="login-password"
class="input-field w-full rounded-lg py-3 pl-10 pr-4 text-sm" placeholder="••••••••"
autocomplete="current-password" required>
</div>
<div class="text-right mt-1">
<button type="button" onclick="forgotPassword()"
class="text-xs text-green-600 hover:text-emerald-800 font-semibold hover:underline">Forgot
Password?</button>
</div>
</div>
<button type="submit" id="login-btn"
class="w-full bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white font-bold py-2.5 px-4 rounded-lg transition-all shadow-md shadow-green-200 dark:shadow-none py-3 rounded-lg transition shadow-lg shadow-green-200 transform hover:translate-y-[-1px]">
Sign In
</button>
<div class="flex justify-between mt-3 text-xs">
<a href="index.html" onclick="localStorage.removeItem('ipec_portal_preference')"
class="text-slate-400 hover:text-green-600 transition">Back to Website</a>
<a href="support.html" class="text-green-500 hover:text-green-700 transition">Contact
Support</a>
</div>
</div>
</form>
<!-- Signup Form (Hidden by default) -->
<form id="signup-form" class="space-y-4 hidden" onsubmit="handleAccountActivation(event)">
<div>
<label
class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Corporate
Email</label>
<div class="relative">
<i class="fa-solid fa-envelope absolute left-3 top-3.5 text-slate-400"></i>
<input type="email" id="signup-email"
class="input-field w-full rounded-lg py-3 pl-10 pr-4 text-sm"
placeholder="employee@company.com" autocomplete="username" required>
</div>
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Create
Password</label>
<div class="relative">
<i class="fa-solid fa-lock absolute left-3 top-3.5 text-slate-400"></i>
<input type="password" id="signup-password"
class="input-field w-full rounded-lg py-3 pl-10 pr-4 text-sm" placeholder="••••••••"
autocomplete="new-password" required>
</div>
</div>
<button type="submit" id="signup-btn"
class="w-full bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white font-bold py-2.5 px-4 rounded-lg transition-all shadow-md shadow-green-200 dark:shadow-none py-3 rounded-lg transition shadow-lg shadow-green-200 transform hover:translate-y-[-1px]">
Activate Account
</button>
</form>
<div id="google-signin-container" class="mt-8">
<button type="button" onclick="handleGoogleLogin()"
class="w-full py-3 rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-200 font-bold transition flex items-center justify-center gap-3 shadow-sm">
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" class="w-5 h-5"
alt="Google">
Sign in with Google
</button>
</div>
<div class="mt-6 text-center border-t border-slate-100 dark:border-slate-800 pt-6">
<div id="login-footer" class="flex flex-col gap-4 mt-2">
<p class="text-[10px] text-slate-400 max-w-xs mx-auto leading-relaxed">
<i class="fa-solid fa-circle-info mr-1 text-green-500"></i> First time user? You <span
class="font-bold text-slate-500 dark:text-slate-300">must</span> activate your account
here.
</p>
<button onclick="toggleAuthMode('signup')"
class="block w-full text-center text-xs text-green-600 font-bold hover:text-green-700 hover:underline transition-colors py-3 bg-slate-50 dark:bg-slate-800 rounded-lg">
Create / Activate Account
</button>
</div>
<div id="signup-footer" class="hidden space-y-4">
<p class="text-[10px] text-slate-400 mb-2">Already activated your account?</p>
<button onclick="toggleAuthMode('login')"
class="block w-full text-center text-xs text-green-600 font-bold hover:text-green-700 hover:underline transition-colors py-2">Back
to Login</button>
</div>
</div>
</div>
<!-- Footer Info -->
<div class="text-center text-slate-400 text-xs pb-4 fade-in">
<p class="font-bold mb-1 opacity-70">IPEC Expenze System</p>
<p class="opacity-60">Authorized Access Only. All activities are monitored.</p>
<div class="flex gap-4 justify-center mt-3 opacity-60">
<a href="privacy.html" class="hover:text-green-600 transition">Privacy</a>
<span class="text-slate-300">•</span>
<a href="terms.html" class="hover:text-green-600 transition">Terms</a>
<span class="text-slate-300">•</span>
<a href="contact.html" class="hover:text-green-600 transition">Support</a>
<span class="text-slate-300">•</span>
<a href="admin.html" class="hover:text-green-600 transition flex items-center gap-1"><i
class="fa-solid fa-shield-halved text-[10px]"></i> Admin Access</a>
</div>
</div>
</div>
<!-- Background Blobs -->
<div class="absolute inset-0 z-0 overflow-hidden pointer-events-none opacity-40">
<div
class="absolute top-[10%] left-[10%] w-96 h-96 bg-green-200/50 rounded-full blur-3xl mix-blend-multiply filter dark:bg-green-900/20">
</div>
<div
class="absolute bottom-[20%] right-[10%] w-96 h-96 bg-green-200/50 rounded-full blur-3xl mix-blend-multiply filter dark:bg-green-900/20">
</div>
<div
class="absolute top-[40%] left-[60%] w-72 h-72 bg-red-200/50 rounded-full blur-3xl mix-blend-multiply filter dark:bg-red-900/20">
</div>
</div>
</div>
<!-- Dashboard Screen -->
<div id="dashboard-screen" class="hidden flex-1 flex h-[100dvh] bg-transparent">
<header
class="h-16 glass-header fixed top-0 w-full z-30 px-4 md:px-8 flex items-center justify-between border-b border-white/40 dark:border-slate-800/50 bg-white/70 dark:bg-slate-900/70 backdrop-blur-xl shadow-sm">
<div class="flex items-center gap-3">
<div id="header-logo-container"
class="w-8 h-8 bg-white rounded-lg flex items-center justify-center text-green-600 text-sm shadow-sm overflow-hidden border border-slate-100">
<img id="header-logo-img" class="w-full h-full object-contain hidden" src="">
<i id="header-logo-fallback" class="fa-solid fa-bolt"></i>
</div>
<div class="flex flex-col">
<span class="font-bold text-slate-800 dark:text-slate-100 text-lg tracking-tight leading-none"
id="header-company-name">IPEC <span class="text-green-600">Expense Manager</span></span>
<span class="text-[10px] uppercase font-bold text-slate-400 tracking-wider hidden sm:block">Employee
Dashboard</span>
</div>
</div>
<div class="flex items-center gap-3">
<button id="pwa-install-btn-emp"
class="hidden text-xs bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700 transition font-bold shadow-sm animate-pulse">
<i class="fa-solid fa-download mr-1"></i> Install
</button>
<div class="text-right hidden sm:block">
<p class="text-xs font-bold text-slate-800 dark:text-slate-100" id="user-name-display">Loading...
</p>
<p class="text-[9px] text-slate-500 dark:text-slate-400 uppercase tracking-wide bg-slate-100 dark:bg-slate-800 px-2 py-0.5 rounded-full inline-block mt-0.5"
id="user-role-display">...</p>
</div>
<div
class="flex items-center gap-2 bg-slate-100 dark:bg-slate-800 p-1 rounded-full border border-slate-200 dark:border-slate-700">
<button onclick="openChatModal()"
class="w-8 h-8 rounded-full text-slate-500 dark:text-slate-400 hover:bg-white dark:hover:bg-slate-700 hover:text-green-600 transition flex items-center justify-center relative">
<i class="fa-solid fa-comments text-xs"></i>
<span id="chat-badge"
class="absolute -top-1 -right-1 w-2.5 h-2.5 bg-red-500 rounded-full border-2 border-slate-100 dark:border-slate-800 hidden"></span>
</button>
<button onclick="toggleTheme()"
class="w-8 h-8 rounded-full text-slate-500 dark:text-yellow-400 hover:bg-white dark:hover:bg-slate-700 transition flex items-center justify-center">
<i class="fa-solid fa-moon theme-toggle-icon text-xs"></i>
</button>
<button onclick="openProfileModal()" id="header-profile-btn"
class="w-8 h-8 rounded-full text-slate-500 dark:text-slate-400 hover:bg-white dark:hover:bg-slate-700 hover:text-green-600 transition flex items-center justify-center p-0 overflow-hidden">
<div id="header-profile-avatar" class="w-full h-full flex items-center justify-center">
<i class="fa-solid fa-user-gear text-xs"></i>
</div>
</button>
</div>
<button onclick="handleLogout()"
class="w-8 h-8 rounded-full bg-red-50 hover:bg-red-100 text-red-500 hover:text-red-600 border border-red-100 transition flex items-center justify-center shadow-sm">
<i class="fa-solid fa-power-off text-xs"></i>
</button>
</div>
</header>
<main class="flex-1 flex flex-col pt-20 w-full max-w-6xl mx-auto px-4 pb-24 md:pb-6 overflow-y-auto">
<!-- Stats -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-5 md:gap-6 mb-8 fade-in">
<div
class="card p-5 lg:p-6 rounded-2xl border border-white dark:border-slate-700/50 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:shadow-[0_8px_40px_rgb(0,0,0,0.08)] transition-all duration-300 relative overflow-hidden group">
<div
class="absolute right-0 top-0 w-32 h-32 bg-gradient-to-bl from-emerald-100/80 to-transparent dark:from-emerald-900/30 rounded-bl-full -mr-8 -mt-8 transition-transform duration-500 group-hover:scale-125">
</div>
<div class="relative z-10 flex justify-between items-start">
<div>
<p class="text-xs font-bold text-slate-400 uppercase tracking-wider mb-2">Total Paid</p>
<p class="text-2xl md:text-3xl font-bold text-slate-800 dark:text-slate-100 font-mono tracking-tight"
id="stat-paid">₹0</p>
</div>
<div
class="w-10 h-10 rounded-xl bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center text-green-600 dark:text-green-400">
<i class="fa-solid fa-wallet"></i>
</div>
</div>
</div>
<div
class="card p-5 lg:p-6 rounded-2xl border border-white dark:border-slate-700/50 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:shadow-[0_8px_40px_rgb(0,0,0,0.08)] transition-all duration-300 relative overflow-hidden group">
<div
class="absolute right-0 top-0 w-32 h-32 bg-gradient-to-bl from-amber-100/80 to-transparent dark:from-amber-900/30 rounded-bl-full -mr-8 -mt-8 transition-transform duration-500 group-hover:scale-125">
</div>
<div class="relative z-10 flex justify-between items-start">
<div>
<p class="text-xs font-bold text-slate-400 uppercase tracking-wider mb-2">Pending</p>
<p class="text-2xl md:text-3xl font-bold text-slate-800 dark:text-slate-100 font-mono tracking-tight"
id="stat-pending">₹0</p>
</div>
<div
class="w-10 h-10 rounded-xl bg-amber-100 dark:bg-amber-900/30 flex items-center justify-center text-amber-600 dark:text-amber-400">
<i class="fa-solid fa-hourglass-half"></i>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<button onclick="openCreateModal('EXPENSE')"
class="group bg-slate-900 hover:bg-slate-800 dark:bg-green-600 dark:hover:bg-green-700 text-white p-4 rounded-2xl flex flex-col justify-between shadow-lg shadow-slate-200 dark:shadow-none transition transform hover:-translate-y-1 h-full">
<div class="flex justify-between items-start w-full">
<div class="w-8 h-8 rounded-full bg-white/10 flex items-center justify-center">
<i class="fa-solid fa-receipt text-emerald-300"></i>
</div>
<i
class="fa-solid fa-arrow-right -rotate-45 group-hover:rotate-0 transition duration-300 opacity-50"></i>
</div>
<div class="mt-3 text-left">
<p data-i18n="btn_new_expense" class="text-sm font-bold text-white mb-0.5">New Expense</p>
<p data-i18n="btn_new_expense_sub" class="text-[10px] text-slate-300 dark:text-emerald-100">
Upload Receipt</p>
</div>
</button>
<button onclick="openCreateModal('REQUEST')"
class="group bg-green-600 hover:bg-green-700 text-white p-4 rounded-2xl flex flex-col justify-between shadow-lg shadow-teal-200 dark:shadow-none transition transform hover:-translate-y-1 h-full">
<div class="flex justify-between items-start w-full">
<div class="w-8 h-8 rounded-full bg-white/10 flex items-center justify-center">
<i class="fa-solid fa-box-open text-green-200"></i>
</div>
<i
class="fa-solid fa-arrow-right -rotate-45 group-hover:rotate-0 transition duration-300 opacity-50"></i>
</div>
<div class="mt-3 text-left">
<p data-i18n="btn_request_item" class="text-sm font-bold text-white mb-0.5">Request Item</p>
<p data-i18n="btn_request_item_sub" class="text-[10px] text-green-100">Software / Hardware
</p>
</div>
</button>
</div>
</div>
<!-- Expenses List -->
<div class="card rounded-2xl flex-1 min-h-[500px] flex-shrink-0 overflow-hidden flex flex-col shadow-[0_8px_30px_rgb(0,0,0,0.04)] border border-white dark:border-slate-700/50 bg-white/90 dark:bg-slate-800/90 backdrop-blur-md fade-in mb-6"
style="animation-delay: 0.1s">
<div class="flex border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/30">
<button onclick="toggleEmpView('claims')" id="btn-view-claims"
class="flex-1 py-4 font-bold text-slate-800 dark:text-slate-100 text-sm uppercase tracking-wide border-b-2 border-green-500 bg-white dark:bg-slate-800 transition">
<i class="fa-solid fa-receipt mr-2 text-green-500"></i> Your Claims
</button>
<button onclick="toggleEmpView('tasks')" id="btn-view-tasks"
class="flex-1 py-4 font-bold text-slate-500 dark:text-slate-400 text-sm uppercase tracking-wide border-b-2 border-transparent hover:bg-white dark:hover:bg-slate-800 transition">
<i class="fa-solid fa-list-check mr-2"></i> Your Tasks
</button>
</div>
<!-- Claims Section -->
<div id="section-claims" class="flex-1 flex flex-col overflow-hidden">
<div
class="p-4 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-900/30">
<div class="flex gap-2">
<div class="relative">
<i class="fa-solid fa-search absolute left-3 top-2.5 text-slate-400 text-xs"></i>
<input type="text" id="emp-search" onkeyup="filterExpenses(this.value)"
class="bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg py-1.5 pl-8 pr-3 text-xs focus:ring-1 focus:ring-green-500 outline-none"
placeholder="Search...">
</div>
<button onclick="fetchExpenses()"
class="text-slate-400 hover:text-green-600 transition p-2"><i
class="fa-solid fa-rotate-right"></i></button>
</div>
</div>
<div id="expenses-list"
class="flex-1 overflow-y-auto p-4 space-y-3 bg-slate-50 dark:bg-slate-900/30">
<div class="flex flex-col items-center justify-center h-64 text-slate-400">
<i class="fa-solid fa-circle-notch fa-spin text-2xl mb-3"></i>
<p class="text-xs">Syncing claims...</p>
</div>
</div>
</div>
<!-- Tasks Section -->
<div id="section-tasks" class="hidden flex-1 flex flex-col overflow-hidden">
<div
class="p-4 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-900/30">
<div class="flex gap-2 items-center w-full">
<div class="relative w-full md:w-auto flex-1">
<i class="fa-solid fa-search absolute left-3 top-2.5 text-slate-400 text-xs"></i>
<input type="text" id="emp-task-search" onkeyup="filterEmpTasks()"
class="w-full bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg py-1.5 pl-8 pr-3 text-xs focus:ring-1 focus:ring-green-500 outline-none"
placeholder="Search tasks...">
</div>
<button type="button" onclick="openEmpTaskModal()"
class="shrink-0 bg-green-600 hover:bg-green-700 text-white px-3 py-2 rounded-lg text-xs font-bold transition flex items-center gap-2 shadow-sm">
<i class="fa-solid fa-plus"></i>
New Task
</button>
</div>
</div>
<div class="flex-1 overflow-y-auto p-4 space-y-3 bg-slate-50 dark:bg-slate-900/30"
id="emp-tasks-list">
<div class="flex flex-col items-center justify-center h-64 text-slate-400">
<i class="fa-solid fa-circle-notch fa-spin text-2xl mb-3"></i>
<p class="text-xs">Loading tasks...</p>
</div>
</div>
</div>
</div>
</main>
</div>
<div id="modal-emp-task"
class="fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-50 hidden flex justify-center items-end md:items-center sm:p-4">
<div
class="bg-white dark:bg-slate-800 w-full max-w-lg sm:rounded-2xl shadow-2xl flex flex-col max-h-[90vh] animate-[slideUp_0.3s_ease-out]">
<div
class="px-6 py-4 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-900/50 sm:rounded-t-2xl">
<div>
<h3 class="text-lg font-bold text-slate-800 dark:text-slate-100">Create Task</h3>
<p class="text-xs text-slate-500 dark:text-slate-400">Create a task for yourself or assign it to
anyone.</p>
</div>
<button type="button" onclick="closeEmpTaskModal()"
class="w-10 h-10 rounded-full hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-400 transition flex items-center justify-center">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<form id="emp-create-task-form" onsubmit="handleEmpCreateTask(event)" class="p-6 space-y-4 overflow-y-auto">
<div>
<label class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Task
Title <span class="text-red-500">*</span></label>
<input type="text" id="emp-task-title" class="input-field w-full rounded-lg py-3 px-4 text-sm"
required>
</div>
<div>
<label
class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Description</label>
<textarea id="emp-task-desc"
class="input-field w-full rounded-lg py-3 px-4 text-sm h-24 resize-none"></textarea>
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Assign
To <span class="text-red-500">*</span></label>
<select id="emp-task-assignee" class="input-field w-full rounded-lg py-3 px-4 text-sm" required>
<option value="">Loading...</option>
</select>
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-1">Due
Date <span class="text-red-500">*</span></label>
<input type="date" id="emp-task-due-date" class="input-field w-full rounded-lg py-3 px-4 text-sm"
required>
</div>
<div class="flex gap-3 pt-2">
<button type="button" onclick="closeEmpTaskModal()"
class="flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-100 py-3 rounded-lg text-sm font-bold transition">
Cancel
</button>
<button type="submit" id="btn-emp-create-task"
class="flex-1 bg-green-600 hover:bg-green-700 text-white py-3 rounded-lg text-sm font-bold transition shadow-lg shadow-green-200 dark:shadow-none flex items-center justify-center gap-2">
<span>Send</span>
<i class="fa-solid fa-paper-plane"></i>
</button>
</div>
</form>
</div>
</div>
<!-- Create Modal -->
<div id="modal-create"
class="fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-50 hidden flex justify-center items-end md:items-center sm:p-4">
<div
class="bg-white dark:bg-slate-800 w-full max-w-3xl sm:rounded-2xl shadow-2xl flex flex-col max-h-[90vh] animate-[slideUp_0.3s_ease-out]">
<div
class="px-6 py-4 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-900/50 sm:rounded-t-2xl">
<div>
<h3 class="text-lg font-bold text-slate-800 dark:text-slate-100">New Expense Claim</h3>
<p class="text-xs text-slate-500 dark:text-slate-400">Fill in the details below</p>
</div>
<button onclick="closeModal('modal-create')"
class="w-8 h-8 rounded-full bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 hover:bg-slate-100 flex items-center justify-center text-slate-500 dark:text-slate-400 transition"><i
class="fa-solid fa-xmark"></i></button>
</div>
<div class="flex-1 overflow-y-auto p-6 bg-slate-50 dark:bg-slate-900/30">
<form id="expense-form" class="space-y-5">
<input type="hidden" id="expense-id">
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
<input type="hidden" id="claim-type" value="EXPENSE">
<div class="md:col-span-2">
<label id="label-report-id"
class="block text-xs font-bold text-slate-500 dark:text-slate-400 uppercase mb-1.5">Report
ID <span class="text-green-500 text-[10px] font-normal">(Auto-Generated)</span></label>
<input type="text" id="report-title"
class="input-field w-full rounded-lg p-3 text-sm font-bold text-slate-600 bg-slate-100 cursor-not-allowed"
placeholder="Generating..." readonly>
</div>
<div>
<label
class="block text-xs font-bold text-slate-500 dark:text-slate-400 uppercase mb-1.5">Project
/ Cost Code <span class="text-red-500">*</span></label>
<div class="relative">
<i
class="fa-solid fa-hashtag absolute left-3.5 top-3.5 text-slate-400 text-xs z-10"></i>
<select id="project-code"
class="input-field w-full rounded-lg p-3 pl-9 text-sm bg-white dark:bg-slate-800 appearance-none cursor-pointer">
<option value="" disabled selected>Loading Projects...</option>
</select>
<i
class="fa-solid fa-chevron-down absolute right-3.5 top-3.5 text-slate-400 text-xs pointer-events-none"></i>
</div>
</div>
<div>
<label
class="block text-xs font-bold text-slate-500 dark:text-slate-400 uppercase mb-1.5">Currency</label>
<div class="relative">
<select id="currency"
class="input-field w-full rounded-lg p-3 text-sm bg-white dark:bg-slate-800 appearance-none cursor-pointer">
<option value="INR">🇮🇳 INR (Rupee)</option>
<option value="USD">🇺🇸 USD (Dollar)</option>
<option value="EUR">🇪🇺 EUR (Euro)</option>
<option value="GBP">🇬🇧 GBP (Pound)</option>
</select>
<i
class="fa-solid fa-chevron-down absolute right-3.5 top-3.5 text-slate-400 text-xs pointer-events-none"></i>
</div>
</div>
<div class="md:col-span-2">
<label
class="flex items-start gap-3 p-3 rounded-lg border border-slate-200 dark:border-slate-700 hover:bg-white dark:hover:bg-slate-800 cursor-pointer transition">
<input type="checkbox" id="pre-approved"
class="mt-1 w-4 h-4 text-green-600 rounded focus:ring-green-500 border-gray-300">
<div>
<span
class="block text-sm font-bold text-slate-700 dark:text-slate-200">Pre-Approved
Activity</span>
<span class="block text-xs text-slate-500 dark:text-slate-400 mt-0.5">Check this if
you received prior approval for these expenses.</span>
</div>
</label>
<div id="pre-approved-proof-container"
class="hidden mt-3 pl-2 border-l-2 border-emerald-200 ml-2">
<label class="block text-xs font-bold text-green-600 uppercase mb-1">Approval
Proof</label>
<div class="flex flex-col gap-2">
<!-- File Upload -->
<div class="relative w-full">
<label id="proof-upload-label"
class="flex items-center gap-2 w-full p-2 border border-dashed border-emerald-300 rounded cursor-pointer hover:bg-emerald-50 transition bg-emerald-50/50">
<div
class="w-8 h-8 bg-emerald-100 rounded flex items-center justify-center text-green-600">
<i class="fa-solid fa-file-arrow-up"></i>
</div>
<div class="flex-1 min-w-0">
<span class="block text-xs font-bold text-green-700">Upload
Proof</span>
<span class="block text-[10px] text-green-600/70 truncate">Image or
PDF</span>
</div>
<input type="file" id="proof-file-input" accept="image/*,application/pdf"
class="hidden" onchange="handleProofUpload(this)">
</label>
<button type="button" onclick="removeProof(this)" id="btn-remove-proof"
class="hidden absolute top-1 right-1 w-6 h-6 bg-white rounded-full text-red-500 shadow-md flex items-center justify-center hover:bg-red-50 transition"><i
class="fa-solid fa-times text-xs"></i></button>
</div>
<div class="relative">
<div class="flex items-center gap-2 mb-1">
<span class="text-[10px] text-slate-400 font-bold uppercase">OR</span>
<div class="h-px bg-slate-200 flex-1"></div>
</div>
<i class="fa-solid fa-link absolute left-2 top-6 text-slate-400 text-xs"></i>
<input type="url" id="approval-proof-url"
class="input-field w-full rounded-lg p-2 pl-7 text-xs"
placeholder="Paste Email/Doc Link...">
</div>
<input type="hidden" id="approval-proof-final-url">
</div>
</div>
</div>
<div class="md:col-span-2">
<label
class="block text-xs font-bold text-slate-500 dark:text-slate-400 uppercase mb-1.5">Notes
(Optional)</label>
<textarea id="expense-notes"
class="input-field w-full rounded-lg p-3 text-sm h-20 resize-none"
placeholder="Additional details, justifications, etc..."></textarea>
</div>
</div>
<div class="space-y-4">
<div
class="flex justify-between items-end border-b border-slate-200 dark:border-slate-700 pb-2">
<label class="block text-xs font-bold text-slate-500 dark:text-slate-400 uppercase"><i
class="fa-solid fa-receipt mr-1"></i> Expenses</label>
<span class="text-xs font-bold text-green-600 bg-emerald-50 px-2 py-1 rounded">Total:
<span id="running-total">0.00</span></span>
</div>
<div id="line-items-container" class="space-y-4">
</div>
<button type="button" onclick="addLineItem()"
class="w-full py-3 border border-dashed border-slate-300 rounded-lg text-slate-500 dark:text-slate-400 hover:text-green-600 hover:border-green-400 hover:bg-emerald-50 transition text-xs font-bold uppercase flex items-center justify-center gap-2">
<i class="fa-solid fa-plus-circle"></i> Add Another Expense
</button>
</div>
</form>
</div>
<div
class="px-6 py-4 border-t border-slate-100 dark:border-slate-800 bg-white dark:bg-slate-800 sm:rounded-b-2xl flex justify-end gap-3">
<button onclick="closeModal('modal-create')"
class="px-5 py-2.5 rounded-lg text-slate-500 dark:text-slate-400 hover:bg-slate-100 text-sm font-bold transition">Cancel</button>
<button onclick="submitExpense()" id="btn-submit"
class="px-6 py-2.5 bg-slate-900 hover:bg-slate-800 dark:bg-green-600 dark:hover:bg-green-700 text-white font-bold rounded-lg shadow-lg shadow-slate-200 dark:shadow-none text-sm transition flex items-center gap-2 transform hover:translate-y-[-1px]">
<span>Submit Claim</span> <i class="fa-solid fa-paper-plane"></i>
</button>
</div>
</div>
</div>
<!-- View Modal -->
<div id="modal-view"
class="fixed inset-0 bg-slate-900/60 backdrop-blur-sm z-50 hidden flex items-center justify-center p-4">
<div
class="bg-white dark:bg-slate-800 w-full max-w-lg rounded-xl shadow-2xl p-0 overflow-hidden flex flex-col max-h-[90vh] animate-[scale_0.2s_ease-out]">
<div
class="bg-slate-50 dark:bg-slate-900 p-4 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center shrink-0">
<div class="flex flex-col">
<h3 class="text-sm font-bold text-slate-800 dark:text-slate-100" id="view-title">...</h3>
<div class="flex items-center gap-2 mt-1">
<span id="view-project" class="text-[10px] font-bold text-slate-400 uppercase">...</span>
<span id="view-currency" class="text-[10px] font-bold text-slate-400">...</span>
<span id="view-status" class="badge">...</span>
</div>
</div>
<button onclick="closeModal('modal-view')"
class="text-slate-400 hover:text-slate-600 dark:text-slate-300 w-8 h-8 rounded-full flex items-center justify-center hover:bg-slate-100 transition"><i
class="fa-solid fa-xmark"></i></button>
</div>
<div class="flex-1 overflow-y-auto p-6 space-y-6">
<!-- Pre-Approval Info (Optional) -->
<div id="view-pre-approved"
class="hidden bg-emerald-50 dark:bg-emerald-900/10 p-4 rounded-xl border border-emerald-100 dark:border-emerald-900/30">
<p class="text-xs font-bold text-green-700 dark:text-green-400 flex items-center gap-2">
<i class="fa-solid fa-check-circle"></i> PRE-APPROVED ACTIVITY
</p>
<div id="view-approval-proof" class="hidden mt-2 pt-2 border-t border-emerald-100/50">
<p class="text-[10px] text-green-600 font-bold uppercase mb-1">Approval Proof</p>
<a id="view-approval-link" href="#" target="_blank"
class="text-xs text-green-600 dark:text-green-400 hover:underline break-all block">...</a>
</div>
</div>
<!-- Rejection Message (Optional) -->
<div id="view-reject-msg"
class="hidden bg-red-50 dark:bg-red-900/10 p-4 rounded-xl border border-red-100 dark:border-red-900/30">
<p class="text-xs font-bold text-red-700 dark:text-red-400 flex items-center gap-2">
<i class="fa-solid fa-circle-exclamation"></i> CLAIM REJECTED
</p>
<p class="text-xs text-red-600 dark:text-red-300 mt-2 bg-white/50 dark:bg-slate-900/50 p-3 rounded italic"
id="reject-reason-text">
...
</p>
</div>
<!-- History Timeline -->
<div>
<h4 class="text-xs font-bold text-slate-400 uppercase mb-4 flex items-center gap-2">
<i class="fa-solid fa-clock-rotate-left"></i> Audit Trail
</h4>
<div id="view-timeline" class="space-y-4 ml-1">
<!-- Timeline entries injected by JS -->
</div>
</div>
</div>
<div id="modal-view-footer"
class="p-4 border-t border-slate-100 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/50 flex justify-end gap-3 shrink-0">
<button onclick="closeModal('modal-view')"
class="px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-600 dark:text-slate-300 rounded-lg text-xs font-bold transition">Close</button>
</div>
</div>
</div>
<!-- Line Item Template -->
<template id="tpl-line-item">
<div
class="line-item grid grid-cols-1 md:grid-cols-12 gap-3 p-4 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 relative group animate-[slideUp_0.2s_ease-out]">
<button type="button" onclick="removeLineItem(this)"
class="md:hidden absolute top-2 right-2 text-red-400 hover:text-red-600"><i
class="fa-solid fa-trash"></i></button>
<div class="md:col-span-2">
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Date <span
class="text-red-500">*</span></label>
<input type="date" class="item-date input-field w-full rounded-lg p-2 text-sm" required>
</div>
<div class="md:col-span-3">
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Description <span
class="text-red-500">*</span></label>
<input type="text" class="item-desc input-field w-full rounded-lg p-2 text-sm"
placeholder="Item details" required>
</div>
<div class="md:col-span-2">
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Category <span
class="text-red-500">*</span></label>
<div class="relative">
<select
class="item-category input-field w-full rounded-lg p-2 text-sm appearance-none cursor-pointer">
<option value="Travel">✈️ Travel</option>
<option value="Food">🍔 Food</option>
<option value="Lodging">🏨 Lodging</option>
<option value="Supplies">📦 Supplies</option>
<option value="Other">🔌 Other</option>
</select>
<i
class="fa-solid fa-chevron-down absolute right-3 top-3 text-slate-400 text-xs pointer-events-none"></i>
</div>
</div>
<div class="md:col-span-2">
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Amount <span
class="text-red-500">*</span></label>
<div class="relative">
<span class="absolute left-3 top-2 text-slate-400 text-xs">₹</span>
<input type="number"
class="item-amount input-field w-full rounded-lg p-2 pl-6 text-sm font-mono font-bold"
placeholder="0.00" min="1" step="0.01" oninput="calculateTotal()" required>
</div>
</div>
<div class="md:col-span-3 flex flex-col gap-2">
<div class="flex items-center gap-2">
<div class="flex-1 relative">
<label
class="receipt-label flex items-center gap-2 w-full p-2 border border-dashed border-slate-300 rounded-lg cursor-pointer hover:bg-slate-100 transition h-[38px] overflow-hidden">
<div
class="w-6 h-6 bg-slate-200 rounded flex items-center justify-center text-slate-500 dark:text-slate-400 shrink-0">
<i class="fa-solid fa-camera text-xs"></i>
</div>
<span class="text-xs text-slate-500 dark:text-slate-400 truncate">Upload / Snap
(Optional)</span>
<input type="file" accept="image/*" class="hidden item-file"
onchange="handleFileSelect(this)">
</label>
</div>
<button type="button" onclick="removeImage(this)"
class="btn-remove-img hidden w-[38px] h-[38px] rounded-lg bg-red-50 text-red-500 hover:bg-red-100 flex items-center justify-center shadow-sm transition shrink-0"
title="Remove Image">
<i class="fa-solid fa-times"></i>
</button>
<button type="button" onclick="removeLineItem(this)"
class="hidden md:flex w-[38px] h-[38px] rounded-lg bg-slate-100 hover:bg-red-50 text-slate-400 hover:text-red-500 flex items-center justify-center transition shrink-0"
title="Remove Item">
<i class="fa-solid fa-trash"></i>
</button>
</div>
<div class="flex items-center gap-2">