-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
360 lines (333 loc) · 13.2 KB
/
admin.html
File metadata and controls
360 lines (333 loc) · 13.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Portal - Simpatico HR</title>
<link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Inter', sans-serif;
min-height: 100vh;
background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
overflow-y: auto;
}
.container { max-width: 960px; width: 100%; }
/* Header */
.header { text-align: center; margin-bottom: 48px; }
.header-logo {
display: inline-flex; align-items: center; gap: 12px;
margin-bottom: 16px;
}
.header-logo img {
width: 48px; height: 48px; border-radius: 12px;
border: 2px solid rgba(255,255,255,0.1);
}
.header-logo h1 {
font-size: 28px; font-weight: 800; color: #fff;
}
.header-logo h1 span { color: #F59E0B; }
.header p {
color: rgba(255,255,255,0.45);
font-size: 15px; max-width: 500px; margin: 0 auto;
}
/* Portal Cards */
.portal-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 32px;
}
.portal-card {
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 20px;
padding: 36px 28px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: block;
position: relative;
overflow: hidden;
}
.portal-card::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: transparent;
transition: 0.3s;
}
.portal-card:hover {
background: rgba(255,255,255,0.08);
border-color: rgba(255,255,255,0.15);
transform: translateY(-6px);
box-shadow: 0 24px 48px rgba(0,0,0,0.3);
}
/* Card colors */
.card-hr:hover { border-color: rgba(59,130,246,0.4); }
.card-hr:hover::before { background: #3B82F6; }
.card-hr .card-icon { background: rgba(59,130,246,0.15); color: #60A5FA; }
.card-candidate:hover { border-color: rgba(16,185,129,0.4); }
.card-candidate:hover::before { background: #10B981; }
.card-candidate .card-icon { background: rgba(16,185,129,0.15); color: #34D399; }
.card-super:hover { border-color: rgba(239,68,68,0.4); }
.card-super:hover::before { background: #EF4444; }
.card-super .card-icon { background: rgba(239,68,68,0.15); color: #F87171; }
.card-badge {
display: inline-block;
padding: 3px 10px; border-radius: 6px;
font-size: 10px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.5px;
margin-bottom: 16px;
}
.badge-blue { background: rgba(59,130,246,0.15); color: #60A5FA; }
.badge-green { background: rgba(16,185,129,0.15); color: #34D399; }
.badge-red { background: rgba(239,68,68,0.15); color: #F87171; }
.card-icon {
width: 64px; height: 64px;
border-radius: 16px;
display: flex; align-items: center; justify-content: center;
font-size: 26px;
margin: 0 auto 18px;
transition: transform 0.3s;
}
.portal-card:hover .card-icon { transform: scale(1.1); }
.portal-card h3 {
color: #fff; font-size: 17px;
font-weight: 700; margin-bottom: 10px;
}
.portal-card p {
color: rgba(255,255,255,0.45);
font-size: 13px; line-height: 1.6;
}
.card-arrow {
margin-top: 16px;
color: rgba(255,255,255,0.2);
font-size: 14px;
transition: all 0.3s;
}
.portal-card:hover .card-arrow {
color: rgba(255,255,255,0.6);
transform: translateX(4px);
}
/* Quick Actions */
.quick-section {
text-align: center;
margin-bottom: 24px;
}
.quick-label {
font-size: 11px; font-weight: 600;
color: rgba(255,255,255,0.25);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 14px;
}
.quick-actions {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
}
.quick-btn {
display: inline-flex;
align-items: center; gap: 8px;
padding: 10px 20px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: rgba(255,255,255,0.6);
text-decoration: none;
font-size: 13px; font-weight: 500;
transition: all 0.2s;
}
.quick-btn:hover {
background: rgba(255,255,255,0.08);
border-color: rgba(255,255,255,0.15);
color: #fff;
transform: translateY(-1px);
}
.quick-btn i { font-size: 14px; }
/* Back Link */
.back-link {
display: block;
text-align: center;
color: rgba(255,255,255,0.3);
text-decoration: none;
font-size: 13px;
margin-top: 8px;
transition: 0.2s;
}
.back-link:hover { color: rgba(255,255,255,0.7); }
/* Already logged in banner */
.logged-in-bar {
background: rgba(16,185,129,0.1);
border: 1px solid rgba(16,185,129,0.2);
border-radius: 12px;
padding: 14px 20px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
display: none;
}
.logged-in-bar.show { display: flex; }
.logged-in-bar .info {
display: flex; align-items: center; gap: 10px;
color: #34D399; font-size: 14px; font-weight: 600;
}
.logged-in-bar .info i { font-size: 16px; }
.logged-in-bar .actions { display: flex; gap: 8px; }
.logged-in-bar .btn-go {
padding: 7px 16px; border-radius: 8px;
font-size: 12px; font-weight: 700;
cursor: pointer; border: none; font-family: inherit;
transition: 0.2s;
}
.btn-dashboard { background: #10B981; color: #fff; }
.btn-dashboard:hover { background: #059669; }
.btn-logout { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
.btn-logout:hover { background: rgba(255,255,255,0.12); color: #fff; }
/* Responsive */
@media (max-width: 768px) {
.portal-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 32px; }
.header { margin-bottom: 32px; }
.header-logo h1 { font-size: 22px; }
}
@media (min-width: 769px) and (max-width: 900px) {
.portal-grid { gap: 14px; }
.portal-card { padding: 28px 20px; }
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<div class="header">
<div class="header-logo">
<img src="favicon-96x96.png" alt="Simpatico HR" onerror="this.style.display='none'">
<h1>Simpatico<span>HR</span></h1>
</div>
<p>Choose your portal to access the AI recruitment platform</p>
</div>
<!-- Already Logged In Bar -->
<div class="logged-in-bar" id="loggedInBar">
<div class="info">
<i class="fas fa-check-circle"></i>
<span id="loggedInText">You're already logged in</span>
</div>
<div class="actions">
<button class="btn-go btn-dashboard" id="goToDashboard" onclick="goToDashboard()">
Go to Dashboard →
</button>
<button class="btn-go btn-logout" onclick="logout()">
<i class="fas fa-sign-out-alt"></i> Logout
</button>
</div>
</div>
<!-- Portal Cards -->
<div class="portal-grid">
<!-- HR / Company -->
<a href="platform/login.html" class="portal-card card-hr">
<span class="card-badge badge-blue">COMPANY</span>
<div class="card-icon">
<i class="fas fa-building"></i>
</div>
<h3>HR / Company Portal</h3>
<p>Post jobs, manage applications, conduct AI interviews, and access the ATS dashboard.</p>
<div class="card-arrow"><i class="fas fa-arrow-right"></i></div>
</a>
<!-- Candidate -->
<a href="platform/login.html" class="portal-card card-candidate">
<span class="card-badge badge-green">CANDIDATE</span>
<div class="card-icon">
<i class="fas fa-user"></i>
</div>
<h3>Candidate Portal</h3>
<p>Apply for jobs, track applications, take AI interviews, and build your profile.</p>
<div class="card-arrow"><i class="fas fa-arrow-right"></i></div>
</a>
<!-- Super Admin -->
<a href="platform/login.html?role=super_admin" class="portal-card card-super">
<span class="card-badge badge-red">RESTRICTED</span>
<div class="card-icon">
<i class="fas fa-shield-alt"></i>
</div>
<h3>Super Admin</h3>
<p>Platform management, company oversight, system config, and full analytics.</p>
<div class="card-arrow"><i class="fas fa-arrow-right"></i></div>
</a>
</div>
<!-- Quick Actions -->
<div class="quick-section">
<div class="quick-label">Quick Actions</div>
<div class="quick-actions">
<a href="platform/register-company.html" class="quick-btn">
<i class="fas fa-plus-circle"></i> Register Company
</a>
<a href="platform/register-candidate.html" class="quick-btn">
<i class="fas fa-user-plus"></i> Register as Candidate
</a>
<a href="jobs.html" class="quick-btn">
<i class="fas fa-search"></i> Browse Jobs
</a>
<a href="career-lab.html" class="quick-btn">
<i class="fas fa-flask"></i> Career Lab
</a>
</div>
</div>
<a href="index.html" class="back-link">← Back to simpaticohrconsultancy.com</a>
</div>
<script>
// ═══════════════════════════════════════
// CHECK IF ALREADY LOGGED IN
// ═══════════════════════════════════════
(function() {
const token = localStorage.getItem('simpatico_token');
const user = JSON.parse(localStorage.getItem('simpatico_user') || '{}');
if (token && user.email) {
const bar = document.getElementById('loggedInBar');
const text = document.getElementById('loggedInText');
bar.classList.add('show');
text.textContent = `Logged in as ${user.full_name || user.email} (${user.role || 'user'})`;
}
})();
function goToDashboard() {
const user = JSON.parse(localStorage.getItem('simpatico_user') || '{}');
const role = user.role || '';
switch(role) {
case 'super_admin':
window.location.href = 'platform/super-admin.html';
break;
case 'candidate':
window.location.href = 'dashboard/candidate.html';
break;
case 'interviewer':
window.location.href = 'dashboard/interviewer.html';
break;
case 'hr':
case 'admin':
case 'company_admin':
window.location.href = 'dashboard/hr.html';
break;
default:
window.location.href = 'platform/login.html';
}
}
function logout() {
localStorage.removeItem('simpatico_token');
localStorage.removeItem('simpatico_user');
localStorage.removeItem('simpatico_company');
document.getElementById('loggedInBar').classList.remove('show');
}
</script>
</body>
</html>