:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --dark-gray: #7f8c8d;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

body.dark-mode {
    background-color: #18191a !important;
    color: #e4e6eb !important;
}
body.dark-mode .dashboard {
    background-color: #18191a;
}
body.dark-mode .sidebar {
    background-color: #242526;
    color: #e4e6eb;
    border-right: 1px solid #333;
}
body.dark-mode .sidebar-menu li {
    color: #e4e6eb;
}
body.dark-mode .sidebar-menu li.active {
    background-color: #3a3b3c;
    color: #fff;
}
body.dark-mode .sidebar-menu li:hover {
    background-color: #3a3b3c;
}

body.dark-mode .sidebar-menu li.new-feature {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .sidebar-menu li.new-feature:hover {
    background: linear-gradient(135deg, #3a3b3c 0%, #242526 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .new-badge {
    background: #e74c3c;
    color: white;
}
body.dark-mode .sidebar-footer {
    color: #b0b3b8;
    border-top: 1px solid #333;
}
body.dark-mode .main-content {
    background-color: #18191a;
}
body.dark-mode .content-header {
    background: none;
}
body.dark-mode .department-header {
    background: linear-gradient(135deg, #232526, #414345);
    color: #fff;
}
body.dark-mode .content-body {
    background-color: #242526;
    color: #e4e6eb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
body.dark-mode .content-footer {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-top-color: #4a5f7a;
}

body.dark-mode .footer-logo-img {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .contact-info {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .footer-version .version {
    background: rgba(255, 255, 255, 0.1);
}
body.dark-mode table {
    background-color: #242526;
    color: #e4e6eb;
}
body.dark-mode th, body.dark-mode td {
    background-color: #242526;
    color: #e4e6eb;
    border-color: #333;
}
body.dark-mode .stat-card {
    background: #232526;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.dark-mode .stat-card i {
    color: #ffd700;
}
body.dark-mode .btn-primary, body.dark-mode .btn-export, body.dark-mode .btn-refresh {
    background: #3a3b3c;
    color: #fff;
    border: 1px solid #555;
}
body.dark-mode .btn-primary:hover, body.dark-mode .btn-export:hover, body.dark-mode .btn-refresh:hover {
    background: #555;
}
body.dark-mode input, body.dark-mode select {
    background: #232526;
    color: #e4e6eb;
    border: 1px solid #333;
}
body.dark-mode .loading-state, body.dark-mode .error-state {
    background: #232526;
    color: #e4e6eb;
}

body.dark-mode,
body.dark-mode * {
    color: #e4e6eb !important;
    border-color: #333 !important;
}
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}

.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    height: 100vh;
    position: fixed;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-bottom: 1px solid #f5f5f5;
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sidebar-logo {
    height: 60px;
    width: 60px;
    max-width: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.close-menu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 1.3rem;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
}

.sidebar-menu {
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-menu li {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 15px;
    border-radius: 8px;
}

.sidebar-menu li span:first-child {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #555;
}

.sidebar-menu li:hover {
    background-color: #f8f9fa;
}

/* New feature styling */
.sidebar-menu li.new-feature {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 8px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-menu li.new-feature:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sidebar-menu li.new-feature span:first-child {
    color: white;
}

.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.sidebar-menu li.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-menu li.active span:first-child {
    color: white;
}

.sidebar-footer {
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #f5f5f5;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left 0.3s;
    display: flex;
    flex-direction: column;
}

.content-header {
    padding: 20px;
}

.department-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.department-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.department-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content-body {
    flex: 1;
    padding: 20px;
    background-color: white;
    margin: 0 20px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-body > div {
    display: none;
}

.content-body > div.active-content {
    display: block;
}

.content-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.footer-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.footer-text p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
}

.contact-info i {
    color: #ffd700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info span {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.footer-version {
    text-align: right;
}

.footer-version .version {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.version {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 5px;
}

.welcome-message {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0;
}

.welcome-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.welcome-message h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.welcome-message p {
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-controls select, 
.filter-controls input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    background-color: white;
}

.filter-controls input {
    flex: 1;
    min-width: 200px;
}

.table-container {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f8ff;
}

.status-active {
    color: #27ae60;
    font-weight: 500;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 500;
}

.status-other {
    color: #f39c12;
    font-weight: 500;
}

.status-unknown {
    color: #95a5a6;
    font-style: italic;
}

.table-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-btn {
    background: none;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:not(:disabled):hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-info {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.search-container {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-instructions {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 0.95rem;
}

.search-instructions p {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.search-instructions i {
    color: var(--primary-color);
    margin-right: 8px;
}

.scoring-rules {
    padding-left: 20px;
    margin-top: 10px;
}

.scoring-rules li {
    margin-bottom: 8px;
    color: var(--text-color);
}

.scoring-rules strong {
    color: var(--secondary-color);
}

.improvement-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-top: 15px;
    border-radius: 5px;
    color: #d32f2f;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.improvement-notice i {
    color: #d32f2f;
    font-size: 1.2rem;
    margin-top: 2px;
}

.improvement-notice strong {
    color: #d32f2f;
}

body.dark-mode .improvement-notice {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}

.student-search-result {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
    display: none;
}

.student-search-result.active {
    display: block;
}

body.dark-mode .student-search-result.active {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}

.student-info {
    margin-bottom: 30px;
}

.student-info h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.student-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.student-details p {
    margin-bottom: 8px;
    display: flex;
}

.student-details strong {
    min-width: 120px;
    display: inline-block;
    color: var(--secondary-color);
}

.score-section {
    margin-top: 30px;
}

.score-section-title {
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.score-section-title h3 {
    display: inline-block;
    padding: 0 20px;
    background: white;
    position: relative;
    z-index: 1;
}

.score-section-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    z-index: 0;
}

.semester-tables {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.semester-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.semester-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.semester-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.semester-header i {
    font-size: 1.2rem;
}

.score-table-container {
    overflow-x: auto;
    padding: 15px;
}

.score-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    table-layout: fixed;
}

.score-table th {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    font-weight: 500;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    text-align: center;
}

.score-table th:first-child {
    text-align: left;
}

.score-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.score-table td.text-center {
    text-align: center;
}

.subject-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subject-name i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.math-icon { color: #e74c3c; }
.literature-icon { color: #3498db; }
.physics-icon { color: #9b59b6; }
.chemistry-icon { color: #1abc9c; }
.biology-icon { color: #27ae60; }
.history-icon { color: #f39c12; }
.geography-icon { color: #d35400; }

.score-value {
    display: inline-block;
    min-width: 50px;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.low-score {
    background-color: #ffebee;
    color: #e53935;
}

.good-score {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.text-muted {
    color: #95a5a6;
    font-style: italic;
}

.separator {
    color: #bdc3c7;
    margin: 0 5px;
}

.sort-icon {
    margin-left: 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
}

.sort-icon.active {
    opacity: 1;
    color: var(--accent-color);
}

.sort-icon:hover {
    opacity: 1;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--accent-color);
}

.notification.warning {
    background-color: var(--warning-color);
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.loading-state {
    text-align: center;
    padding: 20px;
    color: var(--dark-gray);
}

.loading-state i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 20px;
    color: var(--accent-color);
}

.error-state i {
    margin-right: 10px;
}

.btn-primary, 
.btn-secondary, 
.btn-danger,
.btn-export,
.btn-refresh {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #ddd;
}

.btn-danger {
    background-color: var(--accent-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-export {
    background-color: var(--success-color);
    color: white;
}

.btn-export:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-refresh {
    background-color: var(--light-gray);
    color: var(--secondary-color);
}

.btn-refresh:hover {
    background-color: #ddd;
}

.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 90;
    display: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.subject-score.low {
    color: #e74c3c !important;
    font-weight: bold;
}

@media (max-width: 992px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
    
    .department-header h1 {
        font-size: 1.8rem;
    }
    
    .sidebar-logo {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle,
    .close-menu {
        display: block;
    }
    
    .content-body {
        margin: 0 10px 10px;
        padding: 15px;
    }
    
    .department-header {
        padding: 20px;
        margin-top: 60px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .student-details {
        grid-template-columns: 1fr;
    }
    
    .score-table {
        min-width: 600px;
    }
    
    .semester-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sidebar-logo {
        height: 60px;
    }
}

@media (max-width: 576px) {
    .welcome-message {
        padding: 20px 0;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        width: 100%;
    }
    
    .btn-primary,
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
    
    .student-search-result {
        padding: 15px;
    }
}

@media print {
    .sidebar,
    .menu-toggle,
    .action-buttons,
    .filter-controls,
    .content-footer {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-body {
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .no-print {
        display: none !important;
    }
}

body.dark-mode .search-instructions {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}

body.dark-mode .welcome-icon,
body.dark-mode .stat-card i,
body.dark-mode .score-section-title h3,
body.dark-mode .score-section-title::before,
body.dark-mode .math-icon,
body.dark-mode .literature-icon,
body.dark-mode .physics-icon,
body.dark-mode .chemistry-icon,
body.dark-mode .biology-icon,
body.dark-mode .history-icon,
body.dark-mode .geography-icon {
    color: #ffd700 !important;
    filter: brightness(0.8) saturate(0.7);
}
body.dark-mode .stat-card {
    background: #232526 !important;
    color: #e4e6eb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.dark-mode .stat-card h3,
body.dark-mode .stat-card p {
    color: #e4e6eb !important;
}
body.dark-mode .score-table th,
body.dark-mode .score-table td {
    background: #232526 !important;
    color: #e4e6eb !important;
    border-color: #333 !important;
}
body.dark-mode .score-value,
body.dark-mode .low-score,
body.dark-mode .good-score {
    color: #e4e6eb !important;
}
body.dark-mode .status-active {
    background: #388e3c !important;
    color: #fff !important;
}
body.dark-mode .status-inactive {
    background: #b71c1c !important;
    color: #fff !important;
}
body.dark-mode .status-other {
    background: #616161 !important;
    color: #fff !important;
}
body.dark-mode .status-unknown {
    background: #757575 !important;
    color: #fff !important;
}
body.dark-mode .student-info h3,
body.dark-mode .student-details p,
body.dark-mode .student-details strong {
    color: #e4e6eb !important;
}
body.dark-mode .score-section-title {
    background: #232526 !important;
    color: #ffd700 !important;
}
body.dark-mode .semester-header,
body.dark-mode .semester-header h4,
body.dark-mode .semester-header i {
    background: #232526 !important;
    color: #e4e6eb !important;
}
body.dark-mode .notification,
body.dark-mode .notification.success,
body.dark-mode .notification.error,
body.dark-mode .notification.warning {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}

body.dark-mode th {
    background-color: #232526 !important;
    color: #ffd700 !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode tr:nth-child(even) {
    background-color: #232526 !important;
}
body.dark-mode tr:hover {
    background-color: #333 !important;
}
body.dark-mode .status-active {
    color: #7fff7f !important;
    background: #2e7d32 !important;
}
body.dark-mode .status-inactive {
    color: #ff7f7f !important;
    background: #b71c1c !important;
}
body.dark-mode .status-other {
    color: #ffe082 !important;
    background: #616161 !important;
}
body.dark-mode .status-unknown {
    color: #b0b3b8 !important;
    background: #757575 !important;
}
body.dark-mode .student-info h3 {
    color: #ffd700 !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode .student-details p,
body.dark-mode .student-details strong {
    color: #e4e6eb !important;
}
body.dark-mode .score-table th,
body.dark-mode .score-table td {
    background: #232526 !important;
    color: #e4e6eb !important;
    border-color: #333 !important;
}
body.dark-mode .score-table td.text-center {
    color: #ffd700 !important;
}
body.dark-mode .subject-name,
body.dark-mode .subject-name i {
    color: #ffd700 !important;
}
body.dark-mode .score-value,
body.dark-mode .low-score,
body.dark-mode .good-score {
    color: #e4e6eb !important;
}
body.dark-mode .text-muted {
    color: #b0b3b8 !important;
}
body.dark-mode .separator {
    border-color: #333 !important;
}
body.dark-mode .sort-icon,
body.dark-mode .sort-icon.active,
body.dark-mode .sort-icon:hover {
    color: #ffd700 !important;
}
body.dark-mode .notification,
body.dark-mode .notification.success,
body.dark-mode .notification.error,
body.dark-mode .notification.warning {
    background: #232526 !important;
    color: #e4e6eb !important;
    border: 1px solid #333 !important;
}
body.dark-mode .loading-state,
body.dark-mode .loading-state i,
body.dark-mode .error-state,
body.dark-mode .error-state i {
    background: #232526 !important;
    color: #e4e6eb !important;
}
body.dark-mode .btn,
body.dark-mode .btn-primary,
body.dark-mode .btn-export,
body.dark-mode .btn-refresh {
    background: #333 !important;
    color: #ffd700 !important;
    border: 1px solid #555 !important;
}
body.dark-mode .btn-primary:hover,
body.dark-mode .btn-export:hover,
body.dark-mode .btn-refresh:hover {
    background: #444 !important;
}

body.dark-mode .score-table-container {
    background: #232526 !important;
    border: 1px solid #333 !important;
}
body.dark-mode .score-value {
    color: #ffd700 !important;
}
body.dark-mode .low-score {
    color: #ffb74d !important;
}

/* === DARK MODE: BẢNG KẾT QUẢ HỌC TẬP === */
body.dark-mode .score-table-container,
body.dark-mode .student-search-result.active {
    background: #23272f !important;
    border: 1px solid #2c2f36 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
body.dark-mode .score-table {
    border-radius: 10px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}
body.dark-mode .score-table th {
    background: #2c2f36 !important;
    color: #ffe082 !important;
    border-bottom: 1px solid #444 !important;
    font-weight: 600;
    padding: 10px 8px;
    text-align: center;
    letter-spacing: 0.5px;
}
body.dark-mode .score-table td {
    color: #e4e6eb !important;
    border-color: #333 !important;
    padding: 9px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 0.98rem;
}
body.dark-mode .score-table tr {
    background: #23272f !important;
    transition: background 0.2s;
}
body.dark-mode .score-table tr:nth-child(even) {
    background: #262a33 !important;
}
body.dark-mode .score-table tr:hover {
    background: #31343b !important;
}
body.dark-mode .score-value {
    color: #ffe082 !important;
    font-weight: bold;
}
body.dark-mode .low-score {
    color: #ff8a65 !important;
    font-weight: bold;
}
body.dark-mode .good-score {
    color: #81c784 !important;
    font-weight: bold;
}
body.dark-mode .status-active {
    color: #81c784 !important;
    background: #263238 !important;
    border-radius: 6px;
    padding: 2px 8px;
    display: inline-block;
    font-size: 0.95em;
}
body.dark-mode .status-inactive {
    color: #ff8a65 !important;
    background: #263238 !important;
    border-radius: 6px;
    padding: 2px 8px;
    display: inline-block;
    font-size: 0.95em;
}
body.dark-mode .status-other,
body.dark-mode .status-unknown {
    color: #b0b3b8 !important;
    background: #263238 !important;
    border-radius: 6px;
    padding: 2px 8px;
    display: inline-block;
    font-size: 0.95em;
}
body.dark-mode .score-table th .sort-icon,
body.dark-mode .score-table th .sort-icon.active,
body.dark-mode .score-table th .sort-icon:hover,
body.dark-mode .subject-name i,
body.dark-mode .score-table td strong {
    color: #ffe082 !important;
}
body.dark-mode .text-muted {
    color: #b0b3b8 !important;
}
body.dark-mode .score-table td {
    border-bottom: 1px solid #2c2f36 !important;
}
body.dark-mode .score-table tr:last-child td {
    border-bottom: none !important;
}

.sidebar-menu-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 25px;
    margin: 10px 15px 0 15px;
    border-radius: 8px;
    color: #e74c3c;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.sidebar-menu-logout span:first-child {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}
.sidebar-menu-logout:hover {
    background: #ffeaea;
    color: #c0392b;
}
body.dark-mode .sidebar-menu-logout {
    color: #ff7675;
}
body.dark-mode .sidebar-menu-logout:hover {
    background: #3a3b3c;
    color: #ff7675;
}

/* Form đăng ký cải thiện điểm */
.improvement-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-instructions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-instructions h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.form-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.form-instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.improvement-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    background: #2980b9;
}

.student-info-display {
    margin: 25px 0;
}

.info-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 600;
    opacity: 0.9;
}

.info-item .value {
    font-weight: 500;
}

.subjects-selection {
    margin: 30px 0;
}

.subjects-selection h4 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

.subject-checkbox:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.subject-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.subject-checkbox label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.subject-checkbox label i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.current-score {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.current-score.low {
    background: var(--accent-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-actions button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.registration-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.registration-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.registration-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dark mode cho form đăng ký */
body.dark-mode .improvement-form {
    background: #2c3e50;
    color: #ecf0f1;
}

body.dark-mode .form-group label {
    color: #ecf0f1;
}

body.dark-mode .form-group input {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

body.dark-mode .form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.dark-mode .subject-checkbox {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

body.dark-mode .subject-checkbox:hover {
    border-color: #3498db;
    background: #2c3e50;
}

body.dark-mode .form-actions {
    border-top-color: #4a5f7a;
}

body.dark-mode .registration-result.success {
    background: #1e4d2b;
    color: #d4edda;
    border-color: #2d5a3d;
}

body.dark-mode .registration-result.error {
    background: #4d1e1e;
    color: #f8d7da;
    border-color: #5a2d2d;
}

/* Hiển thị info sinh viên khoa học hơn */
.info-grid-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  margin-bottom: 0;
}
.info-grid-flex .info-item {
  margin-bottom: 0;
  min-width: 180px;
}
@media (max-width: 600px) {
  .info-grid-flex {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .info-grid-flex .info-item {
    min-width: unset;
  }
}

/* Student Info Blocks - New Design */
.student-info-blocks {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.info-block {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px;
    min-width: 200px;
    flex: 1;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.info-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.info-block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-right: 16px;
    flex-shrink: 0;
}

.info-block-icon i {
    font-size: 20px;
    color: #ffffff;
}

.info-block-content {
    flex: 1;
    min-width: 0;
}

.info-block-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-block-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    word-break: break-word;
}

/* Dark mode styles for info blocks */
body.dark-mode .info-block {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .info-block:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .info-block-icon {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .info-block-label {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .info-block-value {
    color: #ffffff;
}

/* Responsive design for info blocks */
@media (max-width: 768px) {
    .student-info-blocks {
        flex-direction: column;
        gap: 12px;
    }
    
    .info-block {
        min-width: auto;
        padding: 14px;
    }
    
    .info-block-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .info-block-icon i {
        font-size: 18px;
    }
    
    .info-block-label {
        font-size: 11px;
    }
    
    .info-block-value {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .info-block {
        padding: 12px;
    }
    
    .info-block-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .info-block-icon i {
        font-size: 16px;
    }
    
    .info-block-label {
        font-size: 10px;
    }
    
    .info-block-value {
        font-size: 14px;
    }
}

/* Book Registration Coming Soon Styles */
.coming-soon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.coming-soon-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.coming-soon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.coming-soon-card h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.coming-soon-message {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.9;
}

.coming-soon-message strong {
    color: #ffd700;
    font-weight: 700;
}

.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.feature-item i {
    color: #4ade80;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-item span {
    font-weight: 500;
    text-align: left;
}

.coming-soon-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.coming-soon-notice i {
    color: #ffc107;
    font-size: 1.1rem;
}

.coming-soon-notice span {
    font-weight: 500;
    color: #fff3cd;
}

/* Dark mode styles for coming soon */
body.dark-mode .coming-soon-card {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .feature-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .coming-soon-notice {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

/* Responsive design for coming soon */
@media (max-width: 768px) {
    .coming-soon-container {
        padding: 20px 15px;
        min-height: 50vh;
    }
    
    .coming-soon-card {
        padding: 30px 20px;
    }
    
    .coming-soon-icon {
        font-size: 3rem;
    }
    
    .coming-soon-card h2 {
        font-size: 2rem;
    }
    
    .coming-soon-message {
        font-size: 1.1rem;
    }
    
    .coming-soon-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .coming-soon-card {
        padding: 25px 15px;
    }
    
    .coming-soon-icon {
        font-size: 2.5rem;
    }
    
    .coming-soon-card h2 {
        font-size: 1.8rem;
    }
    
    .coming-soon-message {
        font-size: 1rem;
    }
    
    .feature-item {
        padding: 10px;
    }
    
    .feature-item i {
        font-size: 1rem;
    }
}

/* Registrations List Styles */
.registrations-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.section-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-subheader h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.registration-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.registration-filters select,
.registration-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.registration-filters select:focus,
.registration-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
}

.registrations-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.registrations-loading {
    padding: 40px;
    text-align: center;
    color: var(--dark-gray);
    font-size: 1rem;
}

.registrations-loading i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.registrations-empty {
    padding: 60px 40px;
    text-align: center;
    color: var(--dark-gray);
}

.registrations-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.registrations-empty p {
    font-size: 1.1rem;
    margin: 0;
}

.registrations-list {
    max-height: 500px;
    overflow-y: auto;
}

.registration-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.registration-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.student-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.student-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.student-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.student-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.student-id, .student-class {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.registration-info {
    flex: 1;
    min-width: 0;
}

.card-body {
    padding: 24px;
}

.timeline-section {
    margin-bottom: 24px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.timeline-icon.processed {
    background: #e8f5e8;
    color: #2e7d32;
}

.timeline-content {
    flex: 1;
}

.timeline-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.registration-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--dark-gray);
    flex-wrap: wrap;
}

.registration-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.registration-detail i {
    font-size: 0.8rem;
    width: 12px;
}

.subjects-section {
    margin-top: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 16px;
}

.section-title i {
    color: var(--primary-color);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.subject-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.subject-card:hover {
    background: #e3f2fd;
    border-color: #bbdefb;
    transform: translateY(-2px);
}

.subject-card i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.subject-card span {
    font-weight: 500;
    color: var(--text-color);
}

.subject-card.empty {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #757575;
}

.subject-card.empty i {
    color: #757575;
}

.card-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-action i {
    font-size: 1rem;
}

.registration-status {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.status-icon {
    font-size: 1.2rem;
    color: var(--dark-gray);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.registration-time {
    font-size: 0.8rem;
    color: var(--dark-gray);
    text-align: right;
}

.processed-date {
    font-size: 0.75rem;
    color: var(--success-color);
    text-align: right;
    font-weight: 500;
}

/* Dark mode styles for registrations */
body.dark-mode .registrations-section {
    border-top-color: #4a5f7a;
}

body.dark-mode .section-subheader h4 {
    color: #ecf0f1;
}

body.dark-mode .registration-filters select,
body.dark-mode .registration-filters input {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

body.dark-mode .registration-filters select:focus,
body.dark-mode .registration-filters input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

body.dark-mode .registrations-container {
    background: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .registration-card {
    background: #2c3e50;
    border-color: #4a5f7a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .registration-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .card-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

body.dark-mode .student-avatar {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .student-id, 
body.dark-mode .student-class {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

body.dark-mode .card-body {
    background: #2c3e50;
}

body.dark-mode .timeline-icon {
    background: #34495e;
    color: #3498db;
}

body.dark-mode .timeline-icon.processed {
    background: #2d5a2d;
    color: #2ecc71;
}

body.dark-mode .timeline-label {
    color: #ecf0f1;
}

body.dark-mode .timeline-time {
    color: #bdc3c7;
}

body.dark-mode .section-title {
    color: #ecf0f1;
}

body.dark-mode .section-title i {
    color: #3498db;
}

body.dark-mode .subject-card {
    background: #34495e;
    border-color: #4a5f7a;
}

body.dark-mode .subject-card:hover {
    background: #2c3e50;
    border-color: #3498db;
}

body.dark-mode .subject-card.empty {
    background: #2c3e50;
    border-color: #34495e;
    color: #95a5a6;
}

body.dark-mode .subject-card.empty i {
    color: #95a5a6;
}

body.dark-mode .card-footer {
    background: #34495e;
    border-top-color: #4a5f7a;
}

body.dark-mode .btn-action {
    background: #2c3e50;
    color: #3498db;
    border-color: #4a5f7a;
}

body.dark-mode .btn-action:hover {
    background: #3498db;
    color: white;
}

body.dark-mode .registration-name {
    color: #ecf0f1;
}

body.dark-mode .registration-details {
    color: #bdc3c7;
}

body.dark-mode .subject-tag {
    background: #34495e;
    color: #3498db;
}

body.dark-mode .registration-avatar {
    background: #34495e;
    border-color: #4a5f7a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .registration-id {
    background: rgba(67, 97, 238, 0.2);
    color: #3498db;
}

body.dark-mode .subjects-label {
    color: #bdc3c7;
}

body.dark-mode .subject-tag {
    background: #34495e;
    color: #3498db;
    border-color: #4a5f7a;
}

body.dark-mode .subject-tag.empty {
    background: #2c3e50;
    color: #95a5a6;
    border-color: #34495e;
}

body.dark-mode .status-icon {
    color: #bdc3c7;
}

body.dark-mode .registration-time {
    color: #bdc3c7;
}

body.dark-mode .processed-date {
    color: #2ecc71;
}

/* Responsive design for registrations */
@media (max-width: 768px) {
    .section-subheader {
        flex-direction: column;
        align-items: stretch;
    }
    
    .registration-filters {
        justify-content: stretch;
    }
    
    .registration-filters select,
    .registration-filters input {
        flex: 1;
        min-width: 0;
    }
    
    .registration-card {
        margin-bottom: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .student-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .status-indicator {
        align-self: flex-end;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .registrations-section {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .registration-item {
        padding: 15px;
    }
    
    .registration-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .registration-name {
        font-size: 1rem;
    }
    
    .registration-details {
        font-size: 0.8rem;
    }
    
    /* Footer responsive */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-contact {
        align-items: center;
    }
    
    .contact-info {
        max-width: 100%;
        text-align: center;
    }
    
    .footer-text h4 {
        font-size: 1rem;
    }
    
    .footer-text p {
        font-size: 0.9rem;
    }
    
    .footer-logo-img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .footer-logo-img {
        width: 24px;
        height: 24px;
    }
    .sidebar-logo {
        height: 40px;
        width: 40px;
        max-width: 40px;
    }
}

/* ... existing code ... */
.class-stats-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    margin-bottom: 32px;
    padding: 20px;
}
.class-stats-table h3 {
    margin-top: 0;
    color: var(--primary-color);
    margin-bottom: 18px;
}
.class-stats-table .score-table {
    width: 100%;
    border-collapse: collapse;
}
.class-stats-table .score-table th, .class-stats-table .score-table td {
    border: 1px solid #eaeaea;
    padding: 10px 14px;
    text-align: center;
}
.class-stats-table .score-table th {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: #fff;
}
.class-stats-table .score-table td {
    background: #f9f9f9;
}
/* ... existing code ... */

/* ... existing code ... */
.btn-toggle-stats {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn-toggle-stats:last-child {
    margin-right: 0;
}
.btn-toggle-stats:hover, .btn-toggle-stats.active {
    background: linear-gradient(135deg, #2980b9, var(--primary-color));
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
/* ... existing code ... */

/* ... existing code ... */
.class-stats-content .score-table td, .class-stats-content .score-table th {
    text-align: center;
    vertical-align: middle;
}
.class-stats-content .score-table tr.all-passed {
    background: #e6f9ed !important;
}
/* ... existing code ... */

/* ... existing code ... */
.cell-passed {
    background: #e6f9ed !important;
    font-weight: bold;
    color: #218838 !important;
}
/* ... existing code ... */

/* ... existing code ... */
table th, table td {
  text-align: center;
  vertical-align: middle;
}
/* ... existing code ... */

/* ... existing code ... */
#classStatsSection {
  background: #f8fafd;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(67,97,238,0.07);
  padding: 32px 24px 24px 24px;
  margin-bottom: 32px;
}
#classStatsSection h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #4361ee;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#classStatsTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(67,97,238,0.08);
  overflow: hidden;
}
#classStatsTable th {
  background: linear-gradient(90deg, #4361ee 0%, #6c47ff 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 10px;
  border-bottom: 2px solid #e0e7ff;
}
#classStatsTable td {
  font-size: 1.05rem;
  padding: 12px 8px;
  border-bottom: 1px solid #f0f4fa;
  transition: background 0.2s;
}
#classStatsTable tr:last-child td {
  border-bottom: none;
}
#classStatsTable td.cell-passed {
  background: #e6f9ed !important;
  color: #219150;
  font-weight: 600;
}
#classStatsTable td:not(.cell-passed) {
  background: #fffbe6;
  color: #b8860b;
  font-weight: 500;
}
#classStatsTable tr.all-passed td {
  background: #e6f9ed !important;
  color: #219150;
  font-weight: 700;
}
#classStatsTable tr:hover td {
  background: #f0f4fa;
}
#classStatsTable th, #classStatsTable td {
  text-align: center;
  vertical-align: middle;
}
/* ... existing code ... */

/* Analytics Dashboard Styles */
.analytics-dashboard {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.analytics-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.analytics-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.analytics-section h3 i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Subject Stats Grid */
.subject-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.subject-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subject-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.subject-stat-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.subject-stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.subject-stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Top Students List */
.top-students-list {
    max-height: 300px;
    overflow-y: auto;
}

.student-rank-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.student-rank-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.student-rank-item .rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.student-rank-item .rank.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.student-rank-item .rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e0e0e0 100%);
}

.student-rank-item .rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
}

.student-rank-item .student-info {
    flex: 1;
}

.student-rank-item .student-name {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.student-rank-item .student-details {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.student-rank-item .gpa {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Needs Support List */
.needs-support-list {
    max-height: 300px;
    overflow-y: auto;
}

.support-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff5f5;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.support-item:hover {
    background: #ffeaea;
    transform: translateX(5px);
}

.support-item .support-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.support-item .student-info {
    flex: 1;
}

.support-item .student-name {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.support-item .support-reason {
    font-size: 0.9rem;
    color: #e74c3c;
}

.support-item .low-subjects {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 5px;
}

/* Dark mode styles for analytics */
body.dark-mode .analytics-section {
    background: #2c3e50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .analytics-section h3 {
    color: #ecf0f1;
}

body.dark-mode .analytics-section h3 i {
    color: #ffe082;
}

body.dark-mode .student-rank-item {
    background: #34495e;
}

body.dark-mode .student-rank-item:hover {
    background: #2c3e50;
}

body.dark-mode .support-item {
    background: #2c3e50;
    border-left-color: #e74c3c;
}

body.dark-mode .support-item:hover {
    background: #34495e;
}

body.dark-mode .student-rank-item .student-name,
body.dark-mode .support-item .student-name {
    color: #ecf0f1;
}

body.dark-mode .student-rank-item .student-details,
body.dark-mode .support-item .support-reason,
body.dark-mode .support-item .low-subjects {
    color: #bdc3c7;
}

/* Responsive design for analytics */
@media (max-width: 768px) {
    .analytics-dashboard {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analytics-section {
        padding: 20px;
    }
    
    .subject-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .subject-stat-card {
        padding: 15px;
    }
    
    .subject-stat-card .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .subject-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .student-rank-item,
    .support-item {
        padding: 12px;
    }
    
    .student-rank-item .rank,
    .support-item .support-icon {
        width: 35px;
        height: 35px;
        margin-right: 12px;
    }
}

/* Advanced Search Styles */
.advanced-search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.advanced-search-section h4 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.search-filters .form-group {
    margin-bottom: 0;
}

.search-filters label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.search-filters input,
.search-filters select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-filters input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-filters input:focus,
.search-filters select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.search-filters option {
    background: #2c3e50;
    color: white;
}

.search-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-actions .btn-search {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.search-actions .btn-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.search-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.search-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dark mode styles for advanced search */
body.dark-mode .advanced-search-section {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .search-filters input,
body.dark-mode .search-filters select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-filters input:focus,
body.dark-mode .search-filters select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive design for advanced search */
@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .advanced-search-section {
        padding: 20px;
    }
    
    .advanced-search-section h4 {
        font-size: 1.1rem;
    }
}

/* Attendance Table Styles */
.attendance-cell {
    text-align: center;
    font-weight: 500;
}

.attendance-cell.high-absent {
    background: #ffebee !important;
    color: #c62828 !important;
    font-weight: 700;
}

.total-absent {
    text-align: center;
    font-weight: 700;
    background: #f3e5f5;
    color: #4a148c;
}

.total-absent.high-absent {
    background: #ffebee !important;
    color: #c62828 !important;
}

/* Dark mode styles for attendance */
body.dark-mode .attendance-cell.high-absent {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

body.dark-mode .total-absent {
    background: #2d1b3d !important;
    color: #bb86fc !important;
}

body.dark-mode .total-absent.high-absent {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

/* Attendance Class Stats Table */
#attendanceClassStatsTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(67,97,238,0.08);
    overflow: hidden;
}

#attendanceClassStatsTable th {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 10px;
    border-bottom: 2px solid #e0e7ff;
}

#attendanceClassStatsTable td {
    font-size: 1.05rem;
    padding: 12px 8px;
    border-bottom: 1px solid #f0f4fa;
    transition: background 0.2s;
    text-align: center;
}

#attendanceClassStatsTable tr:last-child td {
    border-bottom: none;
}

#attendanceClassStatsTable td.high-absent {
    background: #ffebee !important;
    color: #c62828;
    font-weight: 600;
}

#attendanceClassStatsTable tr:hover td {
    background: #f0f4fa;
}

/* Dark mode styles for attendance class stats */
body.dark-mode #attendanceClassStatsTable {
    background: #2c3e50;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode #attendanceClassStatsTable th {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

body.dark-mode #attendanceClassStatsTable td {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #34495e;
}

body.dark-mode #attendanceClassStatsTable td.high-absent {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

body.dark-mode #attendanceClassStatsTable tr:hover td {
    background: #34495e;
}

/* Attendance Section Styling */
#attendance-tab .section-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.2);
}

#attendance-tab .section-header h3 {
    color: white;
    margin: 0;
}

#attendance-tab .btn-toggle-stats {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#attendance-tab .btn-toggle-stats:hover,
#attendance-tab .btn-toggle-stats.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Dark mode for attendance section */
body.dark-mode #attendance-tab .section-header {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive design for attendance */
@media (max-width: 768px) {
    #attendanceTable {
        font-size: 0.9rem;
    }
    
    #attendanceTable th,
    #attendanceTable td {
        padding: 8px 6px;
    }
    
    #attendanceClassStatsTable {
        font-size: 0.9rem;
    }
    
    #attendanceClassStatsTable th,
    #attendanceClassStatsTable td {
        padding: 10px 6px;
    }
}

@media (max-width: 480px) {
    #attendanceTable {
        font-size: 0.8rem;
    }
    
    #attendanceTable th,
    #attendanceTable td {
        padding: 6px 4px;
    }
    
    #attendanceClassStatsTable {
        font-size: 0.8rem;
    }
    
    #attendanceClassStatsTable th,
    #attendanceClassStatsTable td {
        padding: 8px 4px;
    }
}

/* Comprehensive Table Styles */
.comprehensive-info {
    margin-bottom: 25px;
}

.comprehensive-info .info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.comprehensive-info .info-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comprehensive-info .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.comprehensive-info .info-item {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Comprehensive Table */
#comprehensiveTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(67,97,238,0.08);
    overflow: hidden;
}

#comprehensiveTable th {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 8px;
    border-bottom: 2px solid #e0e7ff;
    text-align: center;
}

#comprehensiveTable td {
    font-size: 0.95rem;
    padding: 10px 8px;
    border-bottom: 1px solid #f0f4fa;
    text-align: center;
    vertical-align: middle;
}

#comprehensiveTable tr:last-child td {
    border-bottom: none;
}

#comprehensiveTable tr:hover td {
    background: #f0f4fa;
}

/* Score and Absent Cells */
.score-cell.low-score {
    background: #ffebee !important;
    color: #c62828 !important;
    font-weight: 700;
}

.absent-cell.high-absent,
.percent-cell.high-absent {
    background: #fff3e0 !important;
    color: #e65100 !important;
    font-weight: 700;
}

/* Result Cells */
.result-cell.result-pass {
    background: #e8f5e8 !important;
    color: #2e7d32 !important;
    font-weight: 700;
}

.result-cell.result-fail {
    background: #ffebee !important;
    color: #c62828 !important;
    font-weight: 700;
}

/* Note Cells */
.note-cell.note-retake {
    background: #ffebee !important;
    color: #c62828 !important;
    font-weight: 700;
}

.note-cell.note-resit {
    background: #fff3e0 !important;
    color: #e65100 !important;
    font-weight: 700;
}

/* Dark mode styles for comprehensive */
body.dark-mode .comprehensive-info .info-card {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode #comprehensiveTable {
    background: #2c3e50;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode #comprehensiveTable th {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.dark-mode #comprehensiveTable td {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #34495e;
}

body.dark-mode #comprehensiveTable tr:hover td {
    background: #34495e;
}

body.dark-mode .score-cell.low-score {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

body.dark-mode .absent-cell.high-absent,
body.dark-mode .percent-cell.high-absent {
    background: #4d2e1e !important;
    color: #ffb74d !important;
}

body.dark-mode .result-cell.result-pass {
    background: #1e4d2b !important;
    color: #81c784 !important;
}

body.dark-mode .result-cell.result-fail {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

body.dark-mode .note-cell.note-retake {
    background: #4d1e1e !important;
    color: #ff8a65 !important;
}

body.dark-mode .note-cell.note-resit {
    background: #4d2e1e !important;
    color: #ffb74d !important;
}

/* Responsive design for comprehensive */
@media (max-width: 768px) {
    #comprehensiveTable {
        font-size: 0.85rem;
    }
    
    #comprehensiveTable th,
    #comprehensiveTable td {
        padding: 8px 4px;
    }
    
    .comprehensive-info .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #comprehensiveTable {
        font-size: 0.8rem;
    }
    
    #comprehensiveTable th,
    #comprehensiveTable td {
        padding: 6px 2px;
    }
    
    /* Ẩn một số cột trên mobile để vừa màn hình */
    #comprehensiveTable th:nth-child(6),
    #comprehensiveTable th:nth-child(7),
    #comprehensiveTable th:nth-child(8),
    #comprehensiveTable td:nth-child(6),
    #comprehensiveTable td:nth-child(7),
    #comprehensiveTable td:nth-child(8) {
        display: none;
    }
}

/* Responsive design for comprehensive */
@media (max-width: 1200px) {
    #comprehensiveTable {
        font-size: 0.8rem;
    }
    
    #comprehensiveTable th,
    #comprehensiveTable td {
        padding: 6px 3px;
    }
}

@media (max-width: 768px) {
    #comprehensiveTable {
        font-size: 0.75rem;
    }
    
    #comprehensiveTable th,
    #comprehensiveTable td {
        padding: 4px 2px;
    }
    
    /* Ẩn một số cột trên tablet */
    #comprehensiveTable th:nth-child(n+6):nth-child(-n+35),
    #comprehensiveTable td:nth-child(n+6):nth-child(-n+35) {
        display: none;
    }
}

@media (max-width: 480px) {
    #comprehensiveTable {
        font-size: 0.7rem;
    }
    
    #comprehensiveTable th,
    #comprehensiveTable td {
        padding: 3px 1px;
    }
    
    /* Chỉ hiển thị thông tin cơ bản trên mobile */
    #comprehensiveTable th:nth-child(n+5),
    #comprehensiveTable td:nth-child(n+5) {
        display: none;
    }
}