body { 
    font-family: 'Sarabun', sans-serif; 
    background-color: #f8fafc; 
    color: #1e293b;
}

/* Loader */
.loader-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%; 
    background: rgba(0,0,0,0.6); z-index: 9999; 
    display: flex; align-items: center; justify-content: center;
}

/* Role Selection Cards */
.role-card {
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent !important;
}
.role-card:hover {
    border-color: #2563eb !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.1) !important;
}

/* Sidebar Customization */
#teacher-sidebar .nav-link {
    color: #64748b;
    padding: 12px 20px;
    margin-bottom: 5px;
    font-weight: 500;
}
#teacher-sidebar .nav-link.active {
    background-color: #2563eb;
    color: white;
}

/* Stat Cards (Pastel Colors like the Image) */
.bg-light-blue { background-color: #eef2ff; color: #4338ca; cursor: pointer; transition: 0.2s; }
.bg-light-green { background-color: #ecfdf5; color: #059669; cursor: pointer; transition: 0.2s; }
.bg-light-purple { background-color: #faf5ff; color: #7c3aed; cursor: pointer; transition: 0.2s; }

.stat-card-v2:hover {
    transform: scale(1.02);
}

/* Table Style */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}
.table thead th {
    border-bottom: none;
    color: #64748b;
    font-weight: 600;
}
.table tbody tr {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 10px;
}

/* Sidebar Toggle for Mobile */
@media (max-width: 768px) {
    #teacher-sidebar {
        position: fixed;
        left: -260px;
        transition: 0.3s;
    }
    #teacher-sidebar.toggled {
        left: 0;
    }
}

.scanner-animation {
    position: absolute;
    width: 100%;
    height: 3px;
    background: #0d6efd;
    box-shadow: 0 0 15px #0d6efd;
    animation: scanning 2.5s infinite linear;
}

@keyframes scanning {
    0% { top: 0; }
    100% { top: 100%; }
}

:root {
    --primary-color: #4361ee;
    --student-color: #4cc9f0;
    --teacher-color: #f72585;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.role-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #eee;
}

.role-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.15) !important;
}

.icon-circle {
    width: 100px; height: 100px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.card-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
}

.student-bg { background-color: #e0f7fa; }
.teacher-bg { background-color: #fce4ec; }

.nav-link {
    color: #6c757d;
    font-weight: 500;
    transition: 0.3s;
}

.nav-link.active {
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.nav-link:not(.active):hover {
    background-color: #f0f2ff;
    color: var(--primary-color);
}

.bg-light-danger { background-color: #fff5f5; }

/* Scanner Line Animation */
.scanner-line {
    height: 3px;
    width: 100%;
    background: #ff0000;
    position: absolute;
    top: 0;
    z-index: 10;
    box-shadow: 0 0 10px #ff0000;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}
