KevanSoon
Added working database connection and facedection api
03549e5
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: #f8fafc;
color: #334155;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
/* Header design matching the image */
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 3rem;
}
.header-left {
display: flex;
align-items: center;
gap: 1rem;
}
.logo-icon {
width: 48px;
height: 48px;
background: #0ea5e9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.5rem;
}
.header-title {
font-size: 1.5rem;
font-weight: 600;
color: #64748b;
}
.header-right {
display: flex;
align-items: center;
gap: 1rem;
}
.welcome-text {
color: #64748b;
font-size: 0.95rem;
}
.logout-btn {
color: #ef4444;
background: none;
border: none;
font-size: 0.95rem;
cursor: pointer;
font-weight: 500;
}
.logout-btn:hover {
text-decoration: underline;
}
/* Welcome section design */
.welcome-section {
margin-bottom: 3rem;
}
.welcome-title {
font-size: 2rem;
font-weight: 600;
color: #1e293b;
margin-bottom: 0.5rem;
}
.welcome-subtitle {
color: #64748b;
font-size: 1rem;
}
/* Stats cards design matching the image */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin-bottom: 3rem;
}
.stat-card {
background: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
gap: 1rem;
}
.stat-icon {
width: 48px;
height: 48px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
.stat-icon.blue {
background: #dbeafe;
color: #2563eb;
}
.stat-icon.orange {
background: #fed7aa;
color: #ea580c;
}
.stat-icon.yellow {
background: #fef3c7;
color: #d97706;
}
.stat-content h3 {
font-size: 0.875rem;
color: #64748b;
font-weight: 500;
margin-bottom: 0.25rem;
}
.stat-content .stat-number {
font-size: 2rem;
font-weight: 700;
color: #1e293b;
}
/* Section cards design */
.section-card {
background: white;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
}
.section-header {
padding: 1.5rem 2rem;
border-bottom: 1px solid #e2e8f0;
}
.section-title {
font-size: 1.25rem;
font-weight: 600;
color: #1e293b;
margin-bottom: 0.5rem;
}
.section-subtitle {
color: #64748b;
font-size: 0.875rem;
}
.section-content {
padding: 2rem;
}
/* Form elements */
.form-select {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid #d1d5db;
border-radius: 8px;
background: white;
color: #374151;
font-size: 0.875rem;
cursor: pointer;
}
.form-select:focus {
outline: none;
border-color: #0ea5e9;
box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: #374151;
font-size: 0.875rem;
}
.form-input {
width: 100%;
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 0.875rem;
transition: border-color 0.2s;
}
.form-input:focus {
outline: none;
border-color: #0ea5e9;
box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
/* Buttons */
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
font-size: 0.875rem;
}
.btn-primary {
background: #0ea5e9;
color: white;
}
.btn-primary:hover {
background: #0284c7;
}
.btn-secondary {
background: #f1f5f9;
color: #64748b;
border: 1px solid #e2e8f0;
}
.btn-secondary:hover {
background: #e2e8f0;
}
.btn-success {
background: #10b981;
color: white;
}
.btn-success:hover {
background: #059669;
}
.btn-danger {
background: #ef4444;
color: white;
}
.btn-danger:hover {
background: #dc2626;
}
.btn-sm {
padding: 0.375rem 0.75rem;
font-size: 0.75rem;
}
/* Modals */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
.modal.active {
display: flex;
}
.modal-content {
background: white;
padding: 2rem;
border-radius: 16px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.modal-title {
font-size: 1.25rem;
font-weight: 600;
color: #1e293b;
}
.close-btn {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: #64748b;
}
/* Camera and scanning */
.camera-container {
position: relative;
width: 100%;
max-width: 400px;
margin: 0 auto 1rem;
}
.camera-preview {
width: 100%;
height: 300px;
background: #f1f5f9;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: #64748b;
font-size: 0.875rem;
}
.scan-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px;
height: 200px;
border: 2px solid #0ea5e9;
border-radius: 8px;
pointer-events: none;
}
.scan-overlay::before {
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid #0ea5e9;
border-radius: 8px;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
/* Tables */
.attendance-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
.attendance-table th,
.attendance-table td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #e2e8f0;
}
.attendance-table th {
background: #f8fafc;
font-weight: 600;
color: #374151;
}
.status-badge {
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
}
.status-present {
background: #dcfce7;
color: #166534;
}
.status-absent {
background: #fee2e2;
color: #991b1b;
}
/* Lists */
.student-list {
max-height: 300px;
overflow-y: auto;
border: 1px solid #e2e8f0;
border-radius: 8px;
margin-top: 1rem;
}
.student-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem;
border-bottom: 1px solid #e2e8f0;
}
.student-item:last-child {
border-bottom: none;
}
.attendance-controls {
display: flex;
gap: 0.5rem;
}
.export-buttons {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
/* Responsive design */
@media (max-width: 768px) {
.container {
padding: 1rem;
}
.header {
flex-direction: column;
gap: 1rem;
text-align: center;
}
.stats-grid {
grid-template-columns: 1fr;
}
}