/* ==========================================================================
   1. RESET DASAR & BACKGROUND UTAMA
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7fc; /* Background abu-abu kebiruan soft */
    color: #333;
}

/* ==========================================================================
   2. NAVBAR ATAS (UNTUK DASHBOARD & KUIS)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
}

.text-blue {
    color: #0066cc;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: #4a5568;
}

.btn-logout {
    padding: 6px 15px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    color: #e53e3e;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: #fff5f5;
    border-color: #feb2b2;
}

/* ==========================================================================
   3. LAYOUT CONTAINER UTAMA
   ========================================================================== */
.main-container {
    max-width: 1100px; 
    margin: 30px auto;
    padding: 0 20px;
}

/* Banner Notifikasi Biru */
.banner-instruction {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
    font-size: 20px;
    color: #4a5568;
    font-weight: 600;
}

.btn-refresh {
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    transition: background 0.2s;
}

.btn-refresh:hover {
    background-color: #f7fafc;
}

/* ==========================================================================
   4. LAYOUT DASHBOARD UTAMA (1 BARIS 1 MODUL KE BAWAH)
   ========================================================================== */
.modul-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; 
}

.modul-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between; 
    transition: transform 0.2s, box-shadow 0.2s;
}

.modul-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.04);
}

.modul-card.in-progress {
    border-left: 5px solid #2ecc71; 
}

.modul-left-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modul-right-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.icon-status {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.status-progress {
    background-color: #e8f5e9; 
    color: #2ecc71; 
}

.badge-progress {
    background-color: #e8f5e9 !important; 
    color: #2ecc71 !important;            
}

.status-ready {
    background-color: #e1effe;
    color: #1a56db;
}

.modul-text h3 {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
}

.duration {
    font-size: 13px;
    color: #718096;
    margin-top: 2px;
}

.badge {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.badge-progress {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-ready {
    color: #a0aec0;
}

.btn-action {
    min-width: 130px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-blue {
    background: linear-gradient(135deg, #0077e6, #0059b3);
}
.btn-blue:hover {
    background: linear-gradient(135deg, #0066cc, #004d99);
}

.btn-orange {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}
.btn-orange:hover {
    background: linear-gradient(135deg, #27ae60, #219653);
}

/* ==========================================================================
   5. LAYOUT HALAMAN KUIS (CBT STYLE - KIRI SOAL, KANAN NOMOR)
   ========================================================================== */
#quiz-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    margin-top: 10px;
}

#quiz-left {
    flex: 3; 
}

#quiz-right {
    flex: 1; 
    min-width: 290px;
}

.question-container {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.question-text {
    font-size: 17px;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 600;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    padding: 14px 18px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background-color: #ffffff;
    text-align: left;
    font-size: 15px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-item:hover {
    background-color: #f7fafc;
    border-color: #0077e6;
}

.option-item.selected {
    background-color: #e1effe;
    border-color: #0077e6;
    color: #0059b3;
    font-weight: 600;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-nav {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

.timer-area {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   6. PANEL NAVIGASI NOMOR KUIS (SEBELAH KANAN)
   ========================================================================== */
.nav-nomor-container {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.nav-nomor-container h4 {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
}

.grid-nomor {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.num-box {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e0;
    background-color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.num-box:hover {
    border-color: #0077e6;
    background-color: #f7fafc;
}

.num-box.active {
    background-color: #0077e6;
    color: white;
    border-color: #0077e6;
}

.num-box.filled {
    background-color: #e1effe;
    border-color: #0077e6;
    color: #0077e6;
}

.num-box.filled.active {
    background-color: #0059b3;
    color: white;
    border-color: #0059b3;
}

/* ==========================================================================
   7. HALAMAN HASIL SKOR AKHIR & REVIEW PEMBAHASAN
   ========================================================================== */
.result-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.score-circle {
    width: 120px;
    height: 120px;
    border: 5px solid #0077e6;
    border-radius: 50%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#skor-akhir { font-size: 36px; font-weight: bold; color: #0077e6; }
.score-circle p { font-size: 12px; color: #a0aec0; }
.score-details { display: flex; justify-content: center; gap: 30px; margin-top: 15px; font-weight: 600; }
.text-green { color: #2ecc71; }
.text-red { color: #e74c3c; }

.review-title { margin: 30px 0 15px 0; color: #2d3748; }
.review-card-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #cbd5e0;
}
.review-card-item.correct { border-left-color: #2ecc71; background-color: #f0fff4; }
.review-card-item.wrong { border-left-color: #e74c3c; background-color: #fff5f5; }
.pembahasan-text { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; font-style: italic; color: #4a5568; font-size: 14px; }

/* UTILITY CLASS */
.hide { display: none !important; }

/* ==========================================================================
   8. RESPONSIVE LAYOUT UNTUK HP
   ========================================================================== */
@media (max-width: 800px) {
    #quiz-wrapper {
        flex-direction: column-reverse;
    }
    #quiz-right {
        width: 100%;
    }
    .modul-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .modul-right-content {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #edf2f7;
        padding-top: 12px;
    }
    .koran-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 200px;
    margin: 0 auto;
    }
    .baris-koran {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 20px;
        font-weight: bold;
    }
    .input-koran {
        width: 40px;
        height: 40px;
        text-align: center;
        border: 2px solid #0066cc;
        border-radius: 5px;
        font-size: 18px;
    }
    /* Container utama biar kolom-kolom berjejer ke samping (horizontal) */
.koran-container-flex {
    display: flex;
    flex-direction: row;
    gap: 40px; /* Jarak antar kolom */
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-x: auto; /* Biar kalau kolomnya banyak bisa di-scroll ke samping */
}

/* Pengaturan tiap kolom vertikal */
.kolan-kolom-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.nama-kolom {
    font-size: 14px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 15px;
    text-align: center;
}

/* Gaya tampilan angka */
.angka-item {
    font-size: 22px;
    font-weight: bold;
    color: #2d3748;
    margin: 5px 0;
}

/* Container kotak jawaban kecil di sela-sela angka */
.input-container-koran {
    margin: 2px 0;
}

/* Kotak input mini untuk jawaban satuan */
.input-koran-mini {
    width: 30px;
    height: 30px;
    text-align: center;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    color: #0066cc;
}

.input-koran-mini:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 102, 204, 0.2);
}
}