:root {
    --primary: #2c786c;
    --secondary: #004445;
    --accent: #f8b500;
    --light: #faf5e4;
    --dark: #333;
    --vii: #3498db;
    --viii: #2ecc71;
    --ix: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-weight: bold;
}

.tabs {
    display: flex;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab.active {
    background-color: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.tab-content.active {
    display: block;
}

h2 {
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-vii {
    background-color: var(--vii);
}

.btn-viii {
    background-color: var(--viii);
}

.btn-ix {
    background-color: var(--ix);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.progress-container {
    margin-top: 30px;
}

.progress-bar {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background-color: var(--primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.surah-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.surah-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary);
}

.surah-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.surah-name {
    font-weight: 600;
    color: var(--secondary);
}

.surah-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-inprogress {
    background-color: #fff3e0;
    color: #ef6c00;
}

.status-notstarted {
    background-color: #ffebee;
    color: #c62828;
}

.surah-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.student-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
}

.student-card:hover {
    transform: translateY(-5px);
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

.student-name {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 5px;
}

.student-class {
    color: #666;
    margin-bottom: 15px;
}

.admin-panel {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-panel h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.data-management {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.grade-badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.grade-vii {
    background-color: var(--vii);
}

.grade-viii {
    background-color: var(--viii);
}

.grade-ix {
    background-color: var(--ix);
}

.class-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.class-level {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.class-level h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.room-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.room-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.room-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.room-item.active {
    background-color: var(--primary);
    color: white;
}

.filter-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.filter-group {
    margin-bottom: 0;
}

.recent-hafalan-info {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.recent-hafalan-info h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-hafalan-info p {
    margin: 5px 0;
    color: #555;
}

.suggestion-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.suggestion-btn {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1976d2;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.suggestion-btn:hover {
    background-color: #bbdefb;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    color: #666;
    border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .surah-list, .student-list {
        grid-template-columns: 1fr;
    }
    
    .data-management {
        grid-template-columns: 1fr;
    }
    
    .class-levels {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        grid-template-columns: 1fr;
    }
    
    .suggestion-buttons {
        flex-direction: column;
    }
}
/* CSS sebelumnya tetap sama, tambahkan ini di bagian bawah */

/* Progress per surah styles */
.surah-progress-container {
    margin-top: 15px;
}

.surah-progress-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
}

.surah-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.surah-progress-name {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

.surah-progress-percentage {
    font-weight: bold;
    color: var(--primary);
    font-size: 0.85rem;
}

.surah-progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.surah-progress-ayat {
    font-size: 0.8rem;
    color: #666;
}

.surah-progress-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.surah-progress-mini {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.surah-progress-mini-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Enhanced student card */
.enhanced-student-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.enhanced-student-card:hover {
    transform: translateY(-5px);
}

.student-main-info {
    text-align: center;
    margin-bottom: 15px;
}

.student-progress-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.surah-progress-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.progress-summary-item {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.progress-summary-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.progress-summary-label {
    font-size: 0.7rem;
    color: #666;
    margin-top: 2px;
}

/* Progress tab enhancements */
.detailed-progress-view {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.overview-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.overview-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.overview-label {
    font-size: 0.8rem;
    color: #666;
}

.surah-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Status colors */
.status-not-started {
    background-color: #ffebee;
    color: #c62828;
}

.status-in-progress {
    background-color: #fff3e0;
    color: #ef6c00;
}

.status-completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}
/* Styles untuk tabel keterangan nilai */
.nilai-info {
    margin-top: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--primary);
}

.nilai-info h4 {
    color: var(--secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.table-container {
    overflow-x: auto;
}

.nilai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.nilai-table th {
    background-color: var(--primary);
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
}

.nilai-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.nilai-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Warna baris berdasarkan predikat */
.predikat-mumtaz {
    border-left: 4px solid #2e7d32;
    background-color: #e8f5e9;
}

.predikat-jayyid-jiddan {
    border-left: 4px solid #7cb342;
    background-color: #f1f8e9;
}

.predikat-jayyid {
    border-left: 4px solid #f9a825;
    background-color: #fffde7;
}

.predikat-maqbul {
    border-left: 4px solid #ff9800;
    background-color: #fff3e0;
}

.predikat-daif {
    border-left: 4px solid #d32f2f;
    background-color: #ffebee;
}

/* Responsive design untuk tabel */
@media (max-width: 768px) {
    .nilai-table {
        font-size: 0.8rem;
    }
    
    .nilai-table th,
    .nilai-table td {
        padding: 8px 6px;
    }
    
    .nilai-info h4 {
        font-size: 0.9rem;
    }
}
/* Logo Styles */
.logo-img {
    height: 50px; /* Sesuaikan tinggi logo */
    width: auto; /* Biarkan lebar menyesuaikan proporsi */
    object-fit: contain; /* Pastikan gambar tidak terdistorsi */
}

/* Untuk tampilan mobile */
@media (max-width: 768px) {
    .logo-img {
        height: 40px; /* Lebih kecil di mobile */
    }
}

/* Jika logo masih terlalu besar, atur juga layout logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Notification Animation */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}