/* STK Kuis — front-end styles. Mobile-first: mayoritas pengguna (mahasiswa & dosen)
   mengakses lewat HP, bukan laptop. */

.stk-kuis-body {
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    margin: 0;
    padding: 16px;
    font-size: 18px;
    line-height: 1.5;
}

.stk-kuis-daftar-mandiri,
.stk-kuis-transkrip-wrap,
.xkuis-container,
.stk-kuis-daftarnilai {
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px;
    max-width: 640px;
    margin: 0 auto 16px auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stk-kuis-daftar-mandiri h2,
.stk-kuis-transkrip-wrap h3,
.stk-kuis-daftarnilai h3 {
    color: #0B3D66;
    margin-top: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 14px;
    color: #374151;
}
.stk-kuis-label-opsional {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.75em;
    display: block;
}

input[type=text], input[type=password], input[type=number], select, textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}
textarea { font-family: inherit; resize: vertical; }

.btn, button[type=submit] {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}
.btn-utama { background: #0B3D66; color: #fff; }
.btn-utama:active { background: #082a48; }

.stk-kuis-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 600;
}
.stk-kuis-sukses {
    background: #dcfce7;
    color: #14532d;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 600;
}
.stk-kuis-loading { text-align: center; color: #6b7280; }

/* Tabel nilai — dibatasi maksimal 3-4 kolom sempit supaya muat di layar HP tanpa geser */
.stk-kuis-tabel-nilai {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 18px 0;
    font-size: 0.95em;
}
.stk-kuis-tabel-nilai th, .stk-kuis-tabel-nilai td {
    border: 1px solid #e5e7eb;
    padding: 8px 6px;
    text-align: center;
}
.stk-kuis-tabel-nilai th { background: #0B3D66; color: #fff; }
.stk-kuis-total-row td { background: #eef2ff; font-weight: 700; }
.stk-kuis-mk-judul { color: #0B3D66; margin: 18px 0 4px 0; }
.stk-kuis-grand-total { margin-top: 4px; }

/* Kuis — soal & opsi jawaban */
.stk-soal-blok {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}
.stk-soal-nomor { font-weight: 700; color: #0B3D66; }
.stk-soal-pertanyaan { font-size: 1.05em; margin: 6px 0 12px 0; }
.stk-opsi-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}
.stk-opsi-list input[type=radio] { width: auto; margin: 0; transform: scale(1.3); }
.stk-opsi-list input[type=radio]:disabled { opacity: 0.6; }
.stk-opsi-benar { background: #dcfce7 !important; border-color: #16a34a !important; }
.stk-opsi-salah { background: #fee2e2 !important; border-color: #dc2626 !important; }
.stk-periksa-feedback { font-weight: 700; margin: 10px 0; min-height: 1.2em; }
.stk-feedback-benar { color: #15803d; }
.stk-feedback-salah { color: #b91c1c; }
.stk-timer { text-align: center; font-weight: 700; color: #b45309; margin-bottom: 12px; font-size: 1.3em; }
.stk-timer-kritis { color: #dc2626; animation: stk-kedip 1s infinite; }
@keyframes stk-kedip { 50% { opacity: 0.4; } }
.stk-progres { text-align: center; color: #6b7280; font-weight: 600; margin-bottom: 4px; }
.stk-hasil-box { text-align: center; }
.stk-hasil-nilai { font-size: 2.4em; font-weight: 800; color: #0B3D66; }
.stk-info-latihan { background: #eff6ff; color: #1e40af; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.stk-nilai-akhir-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px dashed #cbd5e1;
}
.stk-nilai-akhir-label { font-weight: 700; color: #374151; margin-bottom: 4px; }
.stk-nilai-akhir-angka { font-size: 1.8em; font-weight: 800; color: #7c3aed; }
.stk-nilai-akhir-ket { font-size: 0.8em; color: #6b7280; font-weight: 400; }

/* Tombol Salin */
.stk-kuis-salin-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
.stk-kuis-input-salin {
    flex: 1 1 220px;
    font-family: monospace;
    background: #f1f5f9;
    width: auto;
    margin-top: 0;
}
.stk-kuis-input-salin-besar { font-size: 1.3em; letter-spacing: 2px; text-align: center; }
.stk-kuis-btn-salin {
    flex: 0 0 auto;
    background: #0B3D66;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
}
.stk-kuis-btn-salin.stk-tersalin { background: #15803d; }

/* Halaman dosen — panduan cara menulis soal */
.stk-kuis-panduan {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.stk-kuis-panduan summary {
    font-weight: 700;
    color: #0B3D66;
    cursor: pointer;
}
.stk-kuis-panduan-isi { margin-top: 10px; }
.stk-kuis-panduan ul { padding-left: 20px; }
.stk-kuis-panduan li { margin-bottom: 6px; }
.stk-kuis-contoh-soal {
    background: #fff;
    border: 1px dashed #93c5fd;
    border-radius: 8px;
    padding: 12px;
    white-space: pre-wrap;
    font-size: 0.85em;
    overflow-x: auto;
}

/* Gradebook nilai di halaman dosen — bisa banyak kolom (1 per kuis),
   digulir horizontal di HP daripada dipaksa muat & jadi terlalu kecil. */
.stk-kuis-gradebook-scroll {
    overflow-x: auto;
    margin-top: 14px;
    -webkit-overflow-scrolling: touch;
}
.stk-kuis-gradebook { width: max-content; min-width: 100%; font-size: 0.85em; }
.stk-kuis-gradebook th, .stk-kuis-gradebook td { padding: 6px 8px; white-space: nowrap; }
.stk-kuis-panel-pin { margin-bottom: 16px; }

@media (min-width: 480px) {
    .stk-kuis-body { font-size: 16px; padding: 24px; }
}
