-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.css
More file actions
473 lines (408 loc) · 16.7 KB
/
Copy paththeme.css
File metadata and controls
473 lines (408 loc) · 16.7 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
/* ═══════════════════════════════════════════════════════════════
theme.css — Hostel Management System
Global theme: Microsoft Fluent Design — Light, Clean, Corporate
Usage: <link rel="stylesheet" href="theme.css"> in every page
═══════════════════════════════════════════════════════════════ */
/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');
/* ════════════════════════════════════════
1. CSS VARIABLES — Microsoft Fluent Style
════════════════════════════════════════ */
:root {
/* Brand — Microsoft Blue */
--primary: #0078d4;
--primary-light: #2899f5; /* FIX: was #106ebe (darker than primary — wrong). Now a true lighter tint. */
--primary-dark: #005a9e;
--accent: #00b294;
--accent-hover: #009880;
/* Surfaces — warm cream like Microsoft Rewards */
--bg: #faf9f7;
--bg-secondary: #f3f2f0;
--card: #ffffff;
--card-hover: #f9f9f9;
--border: #e1dfdd;
--border-light: #edebe9;
/* Text */
--text: #201f1e;
--text-secondary: #484644;
--muted: #8a8886;
--text-on-primary:#ffffff;
/* Status */
--success: #107c10;
--success-bg: #dff6dd;
--success-border: #9fd89f;
--warning: #835b00;
--warning-bg: #fff4ce;
--warning-border: #f9ce56;
--danger: #c50f1f;
--danger-bg: #fde7e9;
--danger-border: #f1a7b0;
--info: #0078d4;
--info-bg: #deecf9;
/* Shadows — Fluent subtle depth */
--shadow-sm: 0 1.6px 3.6px rgba(0,0,0,.07), 0 0.3px 0.9px rgba(0,0,0,.05);
--shadow-md: 0 3.2px 7.2px rgba(0,0,0,.09), 0 0.6px 1.8px rgba(0,0,0,.06);
--shadow-lg: 0 6.4px 14.4px rgba(0,0,0,.10), 0 1.2px 3.6px rgba(0,0,0,.07);
/* Radius */
--radius-sm: 4px;
--radius: 8px;
--radius-lg: 12px;
/* Transitions */
--transition: all 0.2s ease;
/* Navbar */
--navbar-bg: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
--navbar-height: 72px;
}
/* ── Dark Mode Variables ── */
[data-theme="dark"] {
--bg: #0f1a13;
--bg-secondary: #162010;
--card: #1a2b1e;
--card-hover: #1f3324;
--border: #2a3d2e;
--border-light: #243628;
--text: #e8e6e0;
--text-secondary: #b0b8ac;
--muted: #6b7d6e;
--shadow-sm: 0 2px 8px rgba(0,0,0,.3);
--shadow-md: 0 4px 20px rgba(0,0,0,.4);
--shadow-lg: 0 8px 40px rgba(0,0,0,.5);
--success-bg: #0d2a1a;
--success-border: #1e5c30;
--warning-bg: #2a1e00;
--warning-border: #5c4000;
--danger-bg: #2a0e0a;
--danger-border: #5c2018;
--info-bg: #0a1040;
--navbar-bg: linear-gradient(135deg, #0f2318 0%, #1a3a2a 100%);
}
/* ════════════════════════════════════════
2. BASE RESET & BODY
════════════════════════════════════════ */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
transition: background 0.3s ease, color 0.3s ease;
/* Offset for sticky navbar */
padding-top: 0;
}
/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
/* ════════════════════════════════════════
3. TYPOGRAPHY UPGRADES
════════════════════════════════════════ */
h1, h2, h3 {
font-family: 'DM Sans', 'Segoe UI', sans-serif;
color: var(--text);
font-weight: 700;
/* Note: no !important needed here — these are base defaults */
}
/* Playfair for special headings */
.heading-serif {
font-family: 'Playfair Display', serif;
color: var(--primary);
}
/* ════════════════════════════════════════
4. CARD UPGRADES — works on .card class
════════════════════════════════════════ */
.card {
background: var(--card) !important;
border: 1px solid var(--border) !important;
border-radius: var(--radius) !important;
box-shadow: var(--shadow-sm) !important;
transition: var(--transition) !important;
color: var(--text); /* FIX: removed unnecessary !important */
}
.card:hover {
box-shadow: var(--shadow-md) !important;
transform: translateY(-3px);
background: var(--card-hover);
}
/* ════════════════════════════════════════
5. BUTTON UPGRADES
════════════════════════════════════════ */
.btn, button[type="submit"], .nav-btn {
font-family: 'DM Sans', sans-serif !important;
font-weight: 600 !important;
transition: var(--transition) !important;
cursor: pointer !important;
}
/* Primary green button */
.btn-primary, button[type="submit"]:not(.btn-danger):not(.btn-warning) {
background: var(--primary) !important;
color: #fff !important;
border: none !important;
border-radius: var(--radius-sm) !important;
}
.btn-primary:hover, button[type="submit"]:not(.btn-danger):not(.btn-warning):hover {
background: var(--primary-light) !important;
transform: translateY(-1px) !important;
box-shadow: 0 4px 12px rgba(26,58,42,.3) !important;
}
/* ════════════════════════════════════════
6. TABLE UPGRADES
════════════════════════════════════════ */
table {
color: var(--text); /* FIX: removed unnecessary !important */
}
thead tr, thead th {
background: var(--primary) !important;
color: #fff !important;
}
tbody tr:hover {
background: var(--card-hover) !important;
}
tbody td {
border-color: var(--border);
color: var(--text); /* FIX: removed unnecessary !important */
}
/* ════════════════════════════════════════
7. FORM ELEMENTS UPGRADES
════════════════════════════════════════ */
input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
select,
textarea {
background: var(--card) !important;
color: var(--text) !important;
border-color: var(--border) !important;
font-family: 'DM Sans', sans-serif !important;
transition: border-color 0.2s, box-shadow 0.2s !important;
}
input:focus, select:focus, textarea:focus {
border-color: var(--primary) !important;
box-shadow: 0 0 0 3px rgba(26,58,42,.1) !important;
outline: none !important;
}
label {
color: var(--text-secondary);
font-family: 'DM Sans', sans-serif; /* FIX: removed unnecessary !important */
}
/* ════════════════════════════════════════
8. DASHBOARD / WELCOME BANNER UPGRADE
════════════════════════════════════════ */
.welcome-banner, .dashboard-header {
background: var(--navbar-bg) !important;
color: #fff !important;
border-radius: var(--radius-lg) !important;
box-shadow: var(--shadow-md) !important;
}
.welcome-banner h2, .welcome-banner h1,
.welcome-banner p, .welcome-banner span {
color: #fff !important;
}
/* ════════════════════════════════════════
9. ALERT / NOTIFICATION BOXES
════════════════════════════════════════ */
.alert-success, .success-msg {
background: var(--success-bg) !important;
border-color: var(--success-border) !important;
color: var(--success) !important;
border-radius: var(--radius-sm) !important;
}
.alert-danger, .alert-error, .error-msg {
background: var(--danger-bg) !important;
border-color: var(--danger-border) !important;
color: var(--danger) !important;
border-radius: var(--radius-sm) !important;
}
.alert-warning {
background: var(--warning-bg) !important;
border-color: var(--warning-border) !important;
color: var(--warning) !important;
border-radius: var(--radius-sm) !important;
}
/* ════════════════════════════════════════
10. NAVBAR UPGRADES (overrides navbar.php)
════════════════════════════════════════ */
.main-navbar {
background: var(--navbar-bg) !important;
height: var(--navbar-height) !important;
box-shadow: 0 2px 20px rgba(0,0,0,.15) !important;
}
/* Smooth navbar link hover */
.nav-btn {
transition: var(--transition) !important;
border-radius: var(--radius-sm) !important;
}
/* ════════════════════════════════════════
11. SIDEBAR UPGRADES
════════════════════════════════════════ */
.sidebar {
background: var(--primary-dark) !important;
transition: transform 0.3s ease !important;
}
.sidebar a, .sidebar-item {
color: rgba(255,255,255,0.85) !important;
transition: var(--transition) !important;
}
.sidebar a:hover, .sidebar-item:hover {
background: rgba(255,255,255,0.1) !important;
color: var(--accent) !important;
padding-left: 1.4rem !important;
}
/* ════════════════════════════════════════
12. ANIMATIONS
════════════════════════════════════════ */
/* Page load fade-in */
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(18px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideInLeft {
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
}
/* Apply to main containers */
.dashboard-container,
.card,
.table-wrap,
main,
.page-content {
/* FIX: Removed `form` — animating every form element causes jarring flashes on
pages with multiple forms, filter bars, and hidden forms. */
animation: fadeInUp 0.4s ease both;
}
/* Staggered card animation */
.grid-menu .card:nth-child(1) { animation-delay: 0.05s; }
.grid-menu .card:nth-child(2) { animation-delay: 0.10s; }
.grid-menu .card:nth-child(3) { animation-delay: 0.15s; }
.grid-menu .card:nth-child(4) { animation-delay: 0.20s; }
.grid-menu .card:nth-child(5) { animation-delay: 0.25s; }
.grid-menu .card:nth-child(6) { animation-delay: 0.30s; }
.grid-menu .card:nth-child(7) { animation-delay: 0.35s; }
.grid-menu .card:nth-child(8) { animation-delay: 0.40s; }
.grid-menu .card:nth-child(9) { animation-delay: 0.45s; }
/* Table row hover slide */
tbody tr { transition: background 0.15s ease, transform 0.15s ease !important; }
/* ════════════════════════════════════════
13. DARK MODE TOGGLE BUTTON
════════════════════════════════════════ */
.dark-toggle-btn {
position: fixed;
bottom: 24px;
right: 24px;
width: 48px;
height: 48px;
border-radius: 50%;
background: var(--primary);
color: #fff;
border: 2px solid var(--accent);
font-size: 20px;
cursor: pointer;
box-shadow: var(--shadow-lg);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
transition: var(--transition);
line-height: 1;
}
.dark-toggle-btn:hover {
background: var(--accent);
color: var(--primary);
transform: scale(1.1) rotate(15deg);
}
/* ════════════════════════════════════════
14. MOBILE RESPONSIVE UPGRADES
════════════════════════════════════════ */
@media (max-width: 768px) {
/* Smaller fonts on mobile */
body { font-size: 14px; }
/* Cards full width */
.card { border-radius: var(--radius-sm) !important; }
/* FIX: Tables scroll horizontally instead of hiding columns.
Hiding columns 5+ was removing critical data (student name, status,
pass type) from all tables on mobile with no way to see it. */
.table-responsive, table {
display: block !important;
overflow-x: auto !important;
-webkit-overflow-scrolling: touch !important;
max-width: 100% !important;
}
/* Stack flex containers */
.navbar-right { gap: 10px !important; }
.live-clock-box { min-width: 160px !important; font-size: 11px !important; }
/* Full width buttons */
.btn, button[type="submit"] {
width: 100% !important;
margin-bottom: 8px !important;
}
}
@media (max-width: 480px) {
.dashboard-container { padding: 10px !important; margin: 10px auto !important; }
.grid-menu { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
.card { min-height: 120px !important; padding: 15px !important; }
.card h3 { font-size: 13px !important; }
}
/* ════════════════════════════════════════
15. DARK MODE — Background & Surface fixes
════════════════════════════════════════ */
[data-theme="dark"] body {
background: var(--bg) !important;
}
[data-theme="dark"] .card {
background: var(--card) !important;
border-color: var(--border) !important;
}
[data-theme="dark"] input:not([type="radio"]):not([type="checkbox"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
background: #0f2318 !important;
color: var(--text) !important;
border-color: var(--border) !important;
}
[data-theme="dark"] table {
background: var(--card) !important;
}
[data-theme="dark"] tbody tr:nth-child(even) {
background: var(--bg-secondary) !important;
}
[data-theme="dark"] tbody tr:hover {
background: var(--card-hover) !important;
}
/* White text/bg overrides in dark mode */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background-color:#fff"] {
background: var(--card) !important;
color: var(--text) !important;
}
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #444"],
[data-theme="dark"] [style*="color:#666"],
[data-theme="dark"] [style*="color: black"] {
color: var(--text) !important;
}
/* ════════════════════════════════════════
16. PRINT — Dark mode OFF for printing
════════════════════════════════════════ */
@media print {
:root, [data-theme="dark"] {
--bg: #fff !important;
--card: #fff !important;
--text: #000 !important;
--border: #ccc !important;
}
.dark-toggle-btn { display: none !important; }
body { background: #fff !important; color: #000 !important; }
}