/* ============================================================
   CSS - emmash School System
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #F1F5F9; color: #0F172A; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ===== TOP BAR ===== */
.top-bar { background: #0F172A; color: white; padding: 8px 0; font-size: 14px; }
.top-bar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.top-bar a { color: white; text-decoration: none; }

/* ===== NAVBAR ===== */
.navbar { background: white; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; flex-wrap: wrap; gap: 20px; }
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-area img { height: 60px; width: auto; }
.logo-area h1 { font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, #b92b27, #1565C0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 32px; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: #0F172A; font-weight: 600; transition: color 0.3s; cursor: pointer; }
.nav-links a:hover { color: #b92b27; }

/* ===== BUTTONS ===== */
.btn-primary { background: #b92b27; color: white; padding: 10px 28px; border-radius: 40px; border: none; cursor: pointer; font-weight: 600; transition: 0.3s; display: inline-block; text-decoration: none; }
.btn-primary:hover { background: #8B1E1A; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #b92b27; color: #b92b27; padding: 8px 24px; border-radius: 40px; cursor: pointer; font-weight: 600; }
.btn-danger { background: #dc2626; color: white; padding: 4px 12px; border-radius: 20px; border: none; cursor: pointer; font-size: 11px; font-weight: 500; transition: 0.2s; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #22c55e; color: white; padding: 8px 20px; border-radius: 40px; border: none; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-success:hover { background: #16a34a; transform: translateY(-2px); }
.btn-warning { background: #f59e0b; color: white; padding: 8px 20px; border-radius: 40px; border: none; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-warning:hover { background: #d97706; transform: translateY(-2px); }

/* ===== BUTTON NDOGO KWA PASSWORD OVERLAY ===== */
.btn-unlock-management {
    background: #dc2626;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
    width: auto;
    line-height: 1.4;
}
.btn-unlock-management:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, #FFFFFF, #F1F5F9); padding: 60px 0; }
.hero-badge { background: linear-gradient(135deg, rgba(139,69,19,0.15), rgba(160,82,45,0.1)); display: inline-block; padding: 8px 24px; border-radius: 40px; margin-bottom: 20px; }
.hero-content h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; }
.hero-content p { font-size: 1.1rem; color: #64748B; margin-bottom: 30px; }
.hero-grid { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; }
.hero-content { flex: 1; }
.hero-logos { flex: 1; text-align: center; }
.hero-logos img { max-width: 250px; }

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 16px; }
.section-sub { text-align: center; color: #64748B; max-width: 680px; margin: 0 auto 40px; }

/* ===== PROGRAMS ===== */
.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.program-card { background: white; border-radius: 24px; padding: 35px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,0.05); }
.program-card i { font-size: 3rem; color: #b92b27; margin-bottom: 20px; }

/* ===== SCHOOL TABS ===== */
.school-tabs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.school-tab-btn { padding: 10px 20px; border: none; border-radius: 50px; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 0.85rem; }
.school-tab-btn.senior { background: #1565C0; color: white; }
.school-tab-btn.junior { background: #0f5c6b; color: white; }
.school-tab-btn.upper_primary { background: #b92b27; color: white; }
.school-tab-btn.lower_primary { background: #e67e22; color: white; }
.school-tab-btn.nursery { background: #8B5CF6; color: white; }
.school-tab-btn.active { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* ===== CARDS ===== */
.card { background: white; border-radius: 24px; padding: 28px; margin-bottom: 30px; box-shadow: 0 8px 20px rgba(0,0,0,0.05); }
.school-management-card { background: linear-gradient(135deg, #1a1a2e, #16213e); color: white; border-radius: 24px; padding: 25px; margin-bottom: 30px; }
.school-management-card h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.school-management-card h3 i { color: #f59e0b; }

/* ===== GRIDS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid #E2E8F0; border-radius: 12px; font-family: inherit; font-size: 1rem; }
.selector-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.selector-row .form-group { flex: 1; margin-bottom: 0; }

/* ===== TABLES ===== */
table { width: 100%; border-collapse: collapse; margin: 15px 0; }
th, td { border: 1px solid #E2E8F0; padding: 12px; text-align: center; }
th { background: #F1F5F9; font-weight: 700; }
.marks-table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
.marks-table th, .marks-table td { border: 1px solid #ddd; padding: 8px; text-align: center; font-size: 11px; }
.marks-table th { background-color: #f2f2f2; }
.marks-table input { width: 70px; padding: 5px; border-radius: 6px; border: 1px solid #ccc; text-align: center; font-size: 11px; }
.marks-input { width: 70px; padding: 6px; border-radius: 8px; border: 1px solid #cbd5e1; text-align: center; font-size: 12px; }

/* ===== CBE LEVELS ===== */
.level-BE { background: #fef3c7; color: #92400e; }
.level-AE { background: #dbeafe; color: #1e40af; }
.level-ME { background: #d1fae5; color: #065f46; }
.level-EE { background: #ede9fe; color: #5b21b6; }
.cbe-badge { background: #0f5c6b20; color: #0f5c6b; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; margin-left: 10px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.contact-info-card, .booking-form-card { background: white; border-radius: 24px; padding: 35px; box-shadow: 0 8px 30px rgba(0,0,0,0.05); }
.contact-info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.contact-info-item i { width: 45px; height: 45px; background: rgba(185,43,39,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #b92b27; }

/* ===== FOOTER ===== */
footer { background: #0F172A; color: #94A3B8; padding: 50px 0 30px; margin-top: 60px; text-align: center; }

/* ===== EMPTY SLATE ===== */
.empty-slate { text-align: center; padding: 40px; color: #64748b; background: #f8fafc; border-radius: 16px; margin: 10px 0; }

/* ===== MODALS ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-content { background: white; border-radius: 24px; padding: 30px; max-width: 450px; width: 90%; color: #0F172A; max-height: 90vh; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 15px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 40px; border: none; font-weight: 600; cursor: pointer; transition: 0.3s; }
.modal-actions .btn-confirm { background: #b92b27; color: white; }
.modal-actions .btn-confirm:hover { background: #8B1E1A; }
.modal-actions .btn-cancel { background: #e2e8f0; color: #0F172A; }
.modal-actions .btn-cancel:hover { background: #cbd5e1; }

.modal-overlay-custom { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 99999; align-items: center; justify-content: center; }
.modal-overlay-custom.active { display: flex; }
.modal-popup { background: white; border-radius: 24px; max-width: 500px; width: 92%; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.3); animation: popIn 0.3s ease; }
@keyframes popIn { from { transform: scale(0.9) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header { background: linear-gradient(135deg, #1e3a5f, #0f2c4f); padding: 24px 28px; border-radius: 24px 24px 0 0; color: white; }
.modal-header h2 { margin: 0; font-size: 22px; }
.modal-header p { margin: 4px 0 0 0; opacity: 0.8; font-size: 14px; }
.modal-body { padding: 24px 28px 20px; }
.modal-footer { padding: 0 28px 24px; display: flex; gap: 10px; }
.modal-footer button { flex: 1; padding: 12px; border-radius: 40px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.3s; border: none; }
.modal-success .modal-header { background: linear-gradient(135deg, #16a34a, #15803d); }
.btn-continue { background: #3b82f6; color: white; }
.btn-continue:hover { background: #2563eb; transform: translateY(-2px); }

/* ===== PASSWORD OVERLAY - ILIYOPUNGUZWA NAFASI ===== */
.password-overlay {
    position: relative;
    padding: 16px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #94a3b8;
    text-align: center;
}
.password-overlay .lock-icon {
    font-size: 28px;
    color: #64748b;
    margin-bottom: 4px;
}
.password-overlay input {
    padding: 6px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    width: 200px;
    text-align: center;
    margin: 6px 0;
}
.password-overlay .btn-unlock {
    background: #0f5c6b;
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
}
.password-overlay .btn-unlock:hover {
    background: #0a3d47;
    transform: translateY(-2px);
}
.password-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}
.password-success {
    color: #16a34a;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== STUDENT MANAGEMENT LOCKED - NAFASI ILIYOPUNGUZWA ===== */
.student-management-locked {
    position: relative;
    padding: 16px 16px;
    background: #fef2f2;
    border-radius: 12px;
    border: 2px solid #dc2626;
    text-align: center;
}
.student-management-locked .lock-icon {
    font-size: 28px;
    color: #dc2626;
    margin-bottom: 4px;
}
.student-management-locked input {
    padding: 6px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    width: 200px;
    text-align: center;
    margin: 6px 0;
}
.student-management-locked .btn-unlock-management {
    background: #dc2626;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
    width: auto;
    line-height: 1.4;
}
.student-management-locked .btn-unlock-management:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}
.student-management-locked .lock-message {
    font-size: 13px;
    color: #64748b;
    margin: 2px 0;
}
.student-management-locked .lock-sub {
    font-size: 11px;
    color: #94a3b8;
    margin: 2px 0;
}

/* ===== PASSWORD ROWS ===== */
.password-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; padding: 8px 12px; background: white; border-radius: 12px; border: 1px solid #e2e8f0; }
.password-row label { font-weight: 600; min-width: 180px; font-size: 13px; }
.password-row input { flex: 1; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; min-width: 150px; }

/* ===== TAB NAVIGATION ===== */
.tab-buttons { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-buttons .btn-tab { padding: 12px 24px; border: none; border-radius: 40px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.3s; color: white; }
.tab-buttons .btn-tab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.tab-buttons .btn-tab.active { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-teacher { background: #0f5c6b; }
.btn-sheet { background: #f59e0b; }
.btn-analysis { background: #8b5cf6; }
.btn-ranking { background: #f97316; }
.btn-report { background: #b92b27; }
.btn-students { background: #22c55e; }
.btn-passwords { background: #8B5CF6; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== BULK IMPORT ===== */
.bulk-import-area { background: #f0fdf4; border: 2px solid #22c55e; border-radius: 20px; padding: 20px; margin-top: 20px; }
.bulk-delete-area { background: #fef2f2; border: 1px solid #fecaca; border-radius: 16px; padding: 15px; margin-top: 15px; }
.bulk-textarea { font-family: monospace; font-size: 13px; min-height: 100px; background: #f8fafc; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid #e2e8f0; }
.preview-badge { background: #e2e8f0; border-radius: 20px; padding: 4px 12px; font-size: 12px; display: inline-block; margin: 3px; }
.student-list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; }
.student-list-item:hover { background: #f8fafc; }
.delete-student-btn { background: #fee2e2; color: #dc2626; border: none; padding: 4px 14px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 500; transition: 0.2s; }
.delete-student-btn:hover { background: #dc2626; color: white; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
.slide-in-left { animation: slideInLeft 0.6s ease forwards; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
.slide-in-right { animation: slideInRight 0.6s ease forwards; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.bounce { animation: bounce 2s ease infinite; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
.float { animation: float 3s ease-in-out infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.pulse { animation: pulse 2s ease-in-out infinite; }
.hover-scale { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) { 
    .container { padding: 0 20px; } 
    .hero-content h1 { font-size: 1.8rem; } 
    .nav-container { flex-direction: column; }
    .school-tab-btn { font-size: 0.7rem; padding: 6px 12px; }
    .selector-row { flex-direction: column; }
    .grid-2 { grid-template-columns: 1fr; }
    .marks-input { width: 55px; font-size: 10px; }
}
@media (max-width: 500px) { .modal-body { padding: 16px 18px; } .modal-footer { flex-direction: column; } }

/* ============================================================
   SCHOOL CONTENT
   ============================================================ */

.exams-setting { background: white; border-radius: 24px; padding: 24px 28px; margin-bottom: 30px; box-shadow: 0 8px 20px rgba(0,0,0,0.05); border-left: 6px solid #b92b27; }
.exams-setting h4 { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.exams-setting h4 i { color: #b92b27; }

.teacher-portal { border-top: 6px solid #0f5c6b; }
.marksheet-portal { border-top: 6px solid #f59e0b; }
.analysis-portal { border-top: 6px solid #8b5cf6; }
.class-ranking-card { border-top: 6px solid #f97316; }
.teacher-portal h3, .marksheet-portal h3, .analysis-portal h3, .class-ranking-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.teacher-portal h3 i { color: #0f5c6b; }
.marksheet-portal h3 i { color: #f59e0b; }
.analysis-portal h3 i { color: #8b5cf6; }
.class-ranking-card h3 i { color: #f97316; }

.teacher-note { font-size: 11px; color: #64748b; margin-top: 10px; display: flex; align-items: flex-start; gap: 6px; }

.paste-marks-area { background: #eff6ff; border: 2px solid #3b82f6; border-radius: 20px; padding: 20px; }
.paste-textarea { font-family: monospace; font-size: 12px; min-height: 70px; background: #f8fafc; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid #e2e8f0; margin-top: 8px; }

.broad-sheet { overflow-x: auto; }
.broad-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
.broad-sheet th, .broad-sheet td { border: 1px solid #e2e8f0; padding: 8px; text-align: center; }
.broad-sheet th { background: #0f172a; color: white; font-weight: 700; }
.broad-sheet .rank-cell { font-weight: 800; }
.broad-sheet .total-cell, .broad-sheet .cbe-points-cell { font-weight: 700; color: #b92b27; }
.broad-sheet tr.rank-1 { background: #fef9c3; }
.broad-sheet tr.rank-2 { background: #f1f5f9; }
.broad-sheet tr.rank-3 { background: #fef3e2; }

.cbe-distro-table, .gender-distro-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 20px; }
.cbe-distro-table th, .cbe-distro-table td,
.gender-distro-table th, .gender-distro-table td { border: 1px solid #e2e8f0; padding: 10px; text-align: center; }
.cbe-distro-table th, .gender-distro-table th { background: #0f172a; color: white; }
.cbe-distro-table .level-label { text-align: left; }
.level-row-EE, .level-cell-EE { background: #ede9fe; }
.level-row-ME, .level-cell-ME { background: #d1fae5; }
.level-row-AE, .level-cell-AE { background: #dbeafe; }
.level-row-BE, .level-cell-BE { background: #fef3c7; }
.level-badge-small { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }

.best-girls-table, .best-boys-table { background: #fdf2f8; border-radius: 16px; padding: 18px; }
.best-boys-table { background: #eff6ff; }
.best-girls-table h4, .best-boys-table h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.best-students-inner { overflow-x: auto; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rank-table th, .rank-table td { border: 1px solid #e2e8f0; padding: 8px; text-align: center; }
.rank-table th { background: #0f172a; color: white; }
.rank-table .rank-number { font-weight: 800; color: #b92b27; }
.rank-table .student-name { text-align: left; }
.rank-table .total-score { font-weight: 700; }

.subject-toppers-container h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.topper-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.topper-card { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 16px; padding: 14px; text-align: center; }
.topper-subject { font-size: 11px; font-weight: 700; color: #f97316; text-transform: uppercase; margin-bottom: 6px; }
.topper-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.topper-score { font-size: 11px; color: #64748b; }

.class-rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.class-rank-table th, .class-rank-table td { border: 1px solid #e2e8f0; padding: 10px; text-align: center; }
.class-rank-table th { background: #0f172a; color: white; }
.class-rank-table tr.rank-1 { background: #fef9c3; }
.class-rank-table tr.rank-2 { background: #f1f5f9; }
.class-rank-table tr.rank-3 { background: #fef3e2; }

.improvement-note { background: #eff6ff; border-left: 4px solid #3b82f6; border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; font-size: 12px; color: #1e3a5f; }
.analysis-card { background: #f8fafc; border-radius: 16px; padding: 18px; text-align: center; }
.analysis-stat { font-size: 1.6rem; font-weight: 800; color: #b92b27; }
.analysis-label { font-size: 11px; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.gender-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }
.gender-card { border-radius: 16px; padding: 18px; text-align: center; }
.gender-card.boys-card { background: #eff6ff; }
.gender-card.girls-card { background: #fdf2f8; }
.gender-card h4 { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.mean-score-block { margin-bottom: 8px; }
.exact-mean-value { font-size: 1.3rem; font-weight: 800; }
.percentage-value { font-size: 12px; color: #64748b; }
.level-badge-large { padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-block; }

.distro-side-by-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin: 16px 0; }
.distro-side-by-side h4 { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.best-students-side-by-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }

.top-performers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.improvement-card { background: #f0fdf4; border-radius: 16px; padding: 16px; border-left: 4px solid #22c55e; }
.improvement-card.dropped-card { background: #fef2f2; border-left-color: #dc2626; }
.improvement-card h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.improvement-stats .student-name { font-weight: 700; margin-bottom: 4px; }
.improvement-stats .score-change { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.improvement-stats .score-change.positive { color: #16a34a; }
.improvement-stats .score-change.negative { color: #dc2626; }
.improvement-stats .term-badge { font-size: 11px; color: #64748b; margin-bottom: 2px; }

.admin-password-area { background: #f8fafc; border-radius: 16px; padding: 20px; }
.btn-save-passwords { background: #16a34a; color: white; padding: 10px 24px; border-radius: 40px; border: none; cursor: pointer; font-weight: 600; margin-right: 10px; margin-top: 10px; }
.btn-save-passwords:hover { background: #15803d; }
.btn-reset-passwords { background: #e2e8f0; color: #0f172a; padding: 10px 24px; border-radius: 40px; border: none; cursor: pointer; font-weight: 600; margin-top: 10px; }
.btn-reset-passwords:hover { background: #cbd5e1; }

@media print {
    body * { visibility: hidden; }
    .report-card-print-area, .report-card-print-area * { visibility: visible; }
    .report-card-print-area { position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; background: white; z-index: 10000; padding: 0; margin: 0; box-sizing: border-box; }
    .report-card-print-area .no-print { display: none !important; }
    @page { size: A4; margin: 1.2cm; }
}

/* ===== SENIOR PATHWAY DROPDOWN (kama ilivyokuwa awali) ===== */
.senior-pathway-selector {
    background: #f0f7ff;
    border: 2px solid #3b82f6;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.senior-pathway-selector label {
    font-weight: 700;
    font-size: 14px;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 8px;
}
.senior-pathway-selector select {
    padding: 8px 20px;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    color: #0f172a;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}
.senior-pathway-selector select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
.senior-pathway-selector .pathway-note {
    font-size: 12px;
    color: #64748b;
    margin-left: auto;
}