/* =========================================================
   UJIAN ONLINE - STYLE.CSS
   Versi lengkap
   ========================================================= */


/* =========================================================
   RESET & DASAR
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    background: #eef4ff;
    color: #1e293b;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-container {
    width: 100%;
    max-width: 950px;
    min-height: 570px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.login-info {
    background: #2563eb;
    color: white;
    padding: 55px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    width: 65px;
    height: 65px;
    border-radius: 15px;
    background: white;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 25px;
}

.login-info h1 {
    font-size: 32px;
    margin-bottom: 18px;
    line-height: 1.2;
}

.login-info > p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 400px;
    margin-bottom: 30px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-item span {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    border-radius: 50%;
    background: white;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}

.info-item p {
    font-size: 14px;
}

.login-box {
    padding: 55px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-box h2 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-button {
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-weight: bold;
}

.login-button:hover {
    background: #1d4ed8;
}

.error-message {
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    margin-top: 15px;
    min-height: 18px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #94a3b8;
}


/* =========================================================
   DASHBOARD SISWA
   ========================================================= */

.dashboard {
    width: 100%;
    min-height: 100vh;
    background: #f1f5f9;
}

.dashboard-header {
    background: white;
    padding: 25px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dashboard-header h1 {
    color: #1e293b;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #64748b;
}

.logout-button {
    width: auto;
    padding: 10px 20px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
}

.logout-button:hover {
    background: #b91c1c;
}

.student-info {
    margin: 35px auto;
    width: 88%;
    background: #2563eb;
    color: white;
    padding: 30px;
    border-radius: 12px;
}

.student-info h2 {
    margin-bottom: 10px;
}

.subject-section {
    width: 88%;
    margin: 0 auto 50px;
}

.subject-section > h2 {
    margin-bottom: 5px;
}

.section-description {
    color: #64748b;
    margin-bottom: 25px;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.subject-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: 0.2s;
}

.subject-card:hover {
    transform: translateY(-4px);
}

.subject-icon {
    font-size: 45px;
    margin-bottom: 10px;
}

.subject-card h3 {
    margin-bottom: 10px;
}

.subject-card p {
    color: #64748b;
    margin-bottom: 20px;
}

.subject-card small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 10px;
}

.subject-card button {
    width: 100%;
}

.subject-card button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}


/* =========================================================
   HALAMAN UJIAN
   ========================================================= */

/* =========================
   HALAMAN UJIAN
   ========================= */

.exam-container {
    min-height: 100vh;
    background: #f1f5f9;
}

.exam-header {
    background: white;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.exam-header h1 {
    margin-bottom: 5px;
}

.exam-header p {
    color: #64748b;
}

.timer {
    background: #2563eb;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
}

.exam-content {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 25px;
}

.question-area {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.question-number {
    color: #2563eb;
    font-weight: bold;
    margin-bottom: 20px;
}

.question-box h2 {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* =========================
   TEKS PERTANYAAN
   ========================= */

.teks-pertanyaan-ujian {
    display: block;
    width: 100%;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* =========================
   GAMBAR PERTANYAAN
   ========================= */

.gambar-pertanyaan-ujian {
    display: block;
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 15px auto;
    border-radius: 8px;
}

/* =========================
   PILIHAN JAWABAN A-E
   ========================= */

/*
   PENTING:
   #pilihan harus dibuat FLEX COLUMN.
   Ini yang membuat A, B, C, D, E
   tersusun dari atas ke bawah.
*/

#pilihan {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 20px;
}

/* Setiap pilihan */

#pilihan .option {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;

    width: 100% !important;
    max-width: 100% !important;

    padding: 12px 14px;
    margin: 0 !important;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background: white;

    cursor: pointer;

    font-size: 15px;

    transition: 0.2s;

    /* Mencegah pilihan berjajar */
    float: none !important;
    clear: both !important;
}

#pilihan .option:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

/* Radio button */

#pilihan .option input[type="radio"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;

    margin: 3px 10px 0 0;
}

/* Label pilihan */

#pilihan .option label {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    cursor: pointer;

    font-size: 15px;
    line-height: 1.5;

    margin: 0;
    padding: 0;
}

/* Huruf A B C D E */

#pilihan .option strong {
    display: inline-block;
    min-width: 25px;

    color: #2563eb;

    font-size: 15px;
}

/* =========================
   ISI PILIHAN
   ========================= */

.isi-pilihan-ujian {
    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

    gap: 8px;

    margin: 0;
    padding: 0;
}

/* Teks pilihan */

.teks-pilihan {
    display: block;
    width: 100%;

    line-height: 1.6;

    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* =========================
   GAMBAR PADA PILIHAN
   ========================= */

.gambar-pilihan-ujian {
    display: block;

    max-width: 100%;
    max-height: 180px;

    width: auto;
    height: auto;

    object-fit: contain;

    margin-top: 8px;

    border-radius: 6px;
}

/* =========================
   NAVIGASI SOAL
   ========================= */

.navigation {
    display: flex;
    justify-content: space-between;

    gap: 10px;

    margin-top: 30px;
}

.navigation button {
    width: auto;

    padding: 12px 20px;

    border: none;
    border-radius: 8px;

    background: #2563eb;
    color: white;

    font-weight: 600;
}

.navigation button:hover {
    background: #1d4ed8;
}

.navigation button:disabled {
    background: #cbd5e1;
    color: #64748b;

    cursor: not-allowed;
}

/* =========================
   NOMOR SOAL
   ========================= */

.question-navigation {
    background: white;

    padding: 25px;

    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    height: fit-content;
}

.question-navigation h3 {
    margin-bottom: 20px;
}

/*
   ID sesuai ujian.html terbaru
*/

#nomorSoalContainer {
    display: grid !important;

    grid-template-columns: repeat(5, 1fr);

    gap: 8px;

    width: 100%;
}

.question-number-button {
    width: 100%;

    height: 42px;

    padding: 0;

    background: white;

    color: #1e293b;

    border: 1px solid #cbd5e1;

    border-radius: 6px;

    cursor: pointer;
}

.question-number-button:hover {
    border-color: #2563eb;
}

.question-number-button.current {
    background: #2563eb;

    color: white;

    border-color: #2563eb;
}

.question-number-button.answered {
    background: #16a34a;

    color: white;

    border-color: #16a34a;
}

/* =========================
   LEGEND
   ========================= */

.legend {
    margin-top: 25px;

    font-size: 13px;

    color: #475569;
}

.legend div {
    display: flex;

    align-items: center;

    margin-bottom: 10px;
}

.legend-box {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    border-radius: 4px;

    margin-right: 8px;

    border: 1px solid #cbd5e1;
}

.legend-box.current {
    background: #2563eb;
}

.legend-box.answered {
    background: #16a34a;
}

.legend-box.unanswered {
    background: white;
}

/* =========================
   TOMBOL KUMPULKAN
   ========================= */

.submit-button {
    width: 100%;

    margin-top: 20px;

    background: #dc2626;

    color: white;

    border: none;

    border-radius: 8px;

    padding: 12px 20px;

    font-weight: 600;
}

.submit-button:hover {
    background: #b91c1c;
}
/* =========================================================
   HASIL UJIAN SISWA
   ========================================================= */

.result-container {
    min-height: 100vh;

    background: #f1f5f9;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 30px;
}

.result-box {
    width: 500px;
    max-width: 100%;

    background: white;

    padding: 40px;

    border-radius: 15px;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #16a34a;

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 40px;
}

.result-box h1 {
    margin-bottom: 10px;
}

.result-message {
    color: #64748b;

    margin-bottom: 30px;
}

.result-info {
    text-align: left;

    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;

    padding: 15px 0;

    margin-bottom: 25px;
}

.info-row {
    display: flex;

    justify-content: space-between;

    padding: 8px 0;

    color: #64748b;
}

.info-row strong {
    color: #1e293b;
}

.score {
    background: #eff6ff;

    padding: 25px;

    border-radius: 12px;

    margin-bottom: 25px;
}

.score p:first-child,
.score p:last-child {
    color: #64748b;
}

.score h2 {
    font-size: 60px;

    color: #2563eb;

    margin: 5px 0;
}


/* =========================================================
   ADMIN - LAYOUT
   ========================================================= */

.admin-container {
    min-height: 100vh;

    display: flex;

    background: #f1f5f9;
}

.admin-sidebar {
    width: 250px;

    min-height: 100vh;

    flex-shrink: 0;

    background: #1e293b;

    color: white;

    display: flex;

    flex-direction: column;

    padding: 25px 15px;
}

.admin-logo {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 10px 30px;

    border-bottom: 1px solid #334155;
}

.admin-logo-icon {
    width: 45px;
    height: 45px;

    background: #2563eb;

    border-radius: 10px;

    display: flex;

    align-items: center;
    justify-content: center;
}

.admin-logo h2 {
    font-size: 17px;

    margin-bottom: 3px;
}

.admin-logo p {
    font-size: 12px;

    color: #94a3b8;
}

.admin-menu {
    margin-top: 25px;

    display: flex;

    flex-direction: column;

    gap: 5px;
}

.admin-menu a,
.admin-sidebar a {
    display: block;

    color: #cbd5e1;

    text-decoration: none;

    padding: 10px 15px;

    border-radius: 6px;

    font-size: 14px;
}

.admin-menu a:hover,
.admin-sidebar a:hover {
    background: #334155;

    color: white;
}

.admin-menu a.active,
.admin-sidebar a.active {
    background: #2563eb;

    color: white;
}

.admin-sidebar-bottom {
    margin-top: auto;
}

.admin-sidebar-bottom button {
    width: 100%;

    border: none;

    background: #dc2626;

    color: white;

    padding: 12px;

    border-radius: 8px;

    font-weight: bold;
}

.admin-sidebar-bottom button:hover {
    background: #b91c1c;
}

.admin-main {
    flex: 1;

    min-width: 0;
}

.admin-header {
    background: white;

    padding: 25px 35px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.admin-header h1 {
    margin-bottom: 5px;
}

.admin-header p {
    color: #64748b;

    font-size: 14px;
}

.admin-profile {
    display: flex;

    align-items: center;

    gap: 10px;
}

.admin-avatar {
    width: 42px;
    height: 42px;

    background: #2563eb;

    color: white;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    font-weight: bold;
}

.admin-profile strong {
    display: block;
}

.admin-profile span {
    font-size: 12px;

    color: #64748b;
}


/* =========================================================
   ADMIN - STATISTIK
   ========================================================= */

.admin-stats {
    padding: 30px 35px;

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;
}

.admin-stat-card {
    background: white;

    padding: 20px;

    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    display: flex;

    align-items: center;

    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    background: #eff6ff;

    border-radius: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 24px;
}

.admin-stat-card span {
    color: #64748b;

    font-size: 13px;
}

.admin-stat-card h2 {
    margin-top: 5px;
}

.admin-content-grid {
    padding: 0 35px 35px;

    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 20px;
}

.admin-panel {
    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.panel-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 18px;
}

.panel-header p {
    color: #64748b;

    font-size: 13px;

    margin-top: 4px;
}

.panel-button,
.add-button {
    width: auto;

    padding: 8px 15px;

    background: #2563eb;

    color: white;

    border: none;

    border-radius: 6px;
}

.panel-button:hover,
.add-button:hover {
    background: #1d4ed8;
}


/* =========================================================
   ADMIN - TABEL
   ========================================================= */

.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;

    border-collapse: collapse;
}

.admin-table th {
    text-align: left;

    padding: 12px;

    background: #f8fafc;

    color: #64748b;

    font-size: 13px;
}

.admin-table td {
    padding: 13px 12px;

    border-bottom: 1px solid #e2e8f0;

    color: #334155;

    font-size: 13px;
}

.score-badge {
    padding: 5px 10px;

    border-radius: 20px;

    font-weight: bold;

    font-size: 12px;
}

.score-badge.good {
    background: #dcfce7;

    color: #15803d;
}

.score-badge.average {
    background: #fef3c7;

    color: #b45309;
}


/* =========================================================
   ADMIN - SUBJECT LIST
   ========================================================= */

.subject-admin-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.subject-admin-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    border: 1px solid #e2e8f0;

    border-radius: 8px;
}

.subject-admin-item > span {
    font-size: 25px;
}

.subject-admin-item strong {
    display: block;

    font-size: 14px;
}

.subject-admin-item small {
    color: #64748b;

    font-size: 12px;
}


/* =========================================================
   KELOLA SOAL
   ========================================================= */

.question-management {
    padding: 30px 35px;
}

.question-toolbar {
    background: white;

    padding: 20px 25px;

    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 20px;
}

.subject-filter {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.subject-filter label {
    font-size: 13px;

    font-weight: bold;
}

.subject-filter select,
#filterMapel {
    width: 280px;

    min-height: 42px;

    border: 1px solid #cbd5e1;

    border-radius: 7px;

    padding: 8px 12px;

    font-size: 14px;

    background: white;

    outline: none;
}

.subject-filter select:focus,
#filterMapel:focus {
    border-color: #2563eb;
}

.add-question-button {
    width: auto;

    background: #2563eb;

    color: white;

    border: none;

    padding: 11px 18px;

    border-radius: 7px;

    font-weight: bold;
}

.add-question-button:hover {
    background: #1d4ed8;
}

.question-info {
    background: #2563eb;

    color: white;

    padding: 20px 25px;

    border-radius: 10px;

    margin-bottom: 20px;
}

.question-info strong {
    display: block;

    font-size: 18px;

    margin-bottom: 5px;
}

.question-info span {
    font-size: 13px;

    opacity: 0.9;
}


/* =========================================================
   KARTU SOAL
   ========================================================= */

.admin-question-card,
.question-card,
.soal-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    padding: 20px;

    margin-bottom: 18px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.question-card-header,
.question-header,
.soal-card-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 18px;

    padding-bottom: 12px;

    border-bottom: 1px solid #e5e7eb;
}

.question-number-admin {
    font-weight: bold;

    color: #2563eb;
}

.nomor-soal {
    display: inline-block;

    padding: 6px 12px;

    border-radius: 20px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 13px;

    font-weight: 600;
}

.question-actions {
    display: flex;

    gap: 8px;
}

.edit-button,
.delete-button {
    width: auto;

    border: none;

    padding: 7px 12px;

    border-radius: 6px;

    font-size: 13px;

    font-weight: bold;
}

.edit-button {
    background: #dbeafe;

    color: #1d4ed8;
}

.edit-button:hover {
    background: #bfdbfe;
}

.delete-button {
    background: #fee2e2;

    color: #dc2626;
}

.delete-button:hover {
    background: #fecaca;
}

.soal-pertanyaan {
    margin-bottom: 18px;
}

.label-soal {
    font-size: 12px;

    font-weight: 600;

    color: #6b7280;

    margin-bottom: 7px;
}

.teks-soal,
.question-text,
.question-text-admin {
    color: #111827;

    font-size: 15px;

    line-height: 1.4;

    white-space: pre-wrap;
}

.question-text,
.question-text-admin {
    margin-bottom: 15px;
}

.question-text-admin {
    font-weight: bold;
}

.soal-image {
    display: block;

    max-width: 100%;

    max-height: 350px;

    object-fit: contain;

    margin-top: 12px;

    border: 1px solid #e5e7eb;

    border-radius: 8px;

    padding: 5px;
}


/* =========================================================
   PILIHAN A-E - PREVIEW ADMIN
   ========================================================= */

.pilihan-preview {
    display: flex;

    flex-direction: column;

    gap: 6px;

    width: 100%;

    margin: 0;

    padding: 0;
}

.pilihan-preview-item {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    width: 100%;

    min-height: 40px;

    padding: 5px 10px;

    margin: 0;

    border: 1px solid #e5e7eb;

    border-radius: 8px;

    background: #fafafa;
}

.pilihan-huruf {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eff6ff;

    color: #2563eb;

    font-weight: 700;

    border-radius: 50%;
}

.pilihan-content {
    flex: 1 1 auto;

    min-width: 0;

    margin: 0;

    padding: 2px 0;

    color: #374151;

    font-size: 14px;

    line-height: 0.1;

    white-space: pre-wrap;

    overflow-wrap: break-word;
}

.pilihan-content > div {
    width: 100%;

    margin: 0;

    padding: 0;

    line-height: 1.3;
}

.pilihan-image {
    display: block;

    max-width: 300px;

    max-height: 180px;

    width: auto;
    height: auto;

    object-fit: contain;

    margin-top: 8px;

    border: 1px solid #ddd;

    border-radius: 6px;

    padding: 4px;

    background: white;
}

.answer-list-admin,
.answer-list {
    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-bottom: 15px;
}

.answer-list-admin div,
.answer-list p {
    padding: 9px 12px;

    border-radius: 6px;

    background: #f8fafc;

    color: #475569;

    font-size: 14px;
}

.answer-list p {
    margin: 0;
}

.answer-list p strong {
    display: inline-block;

    width: 25px;

    color: #2563eb;
}

.correct-answer,
.jawaban-benar {
    padding: 10px 14px;

    border-radius: 8px;

    background: #dcfce7;

    color: #166534;

    font-size: 14px;
}

.correct-answer strong,
.jawaban-benar strong {
    color: #15803d;
}

.jawaban-benar {
    margin-top: 15px;

    padding: 10px 12px;

    background: #ecfdf5;

    color: #047857;

    border-radius: 7px;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    background: white;

    border-radius: 14px;

    padding: 40px;

    text-align: center;

    color: #6b7280;

    border: 1px solid #e5e7eb;
}

.empty-state h3 {
    color: #374151;

    margin-bottom: 8px;
}


/* =========================================================
   MODAL TAMBAH / EDIT SOAL
   ========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.55);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 9999;

    overflow-y: auto;
}

.modal-overlay.show {
    display: flex;
}

.modal-soal {
    width: 100%;

    max-width: 850px;

    max-height: 92vh;

    background: white;

    border-radius: 14px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);

    overflow-y: auto;
}

.modal-soal-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding: 22px 25px;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;

    top: 0;

    background: white;

    z-index: 2;
}

.modal-soal-header h2 {
    margin-bottom: 5px;

    font-size: 21px;
}

.modal-soal-header p {
    color: #6b7280;

    font-size: 14px;
}

.modal-close {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    border: none;

    background: #f3f4f6;

    color: #374151;

    border-radius: 50%;

    font-size: 17px;
}

.modal-close:hover {
    background: #fee2e2;

    color: #dc2626;
}

#formSoal {
    padding: 25px;
}

#formSoal textarea,
#formSoal select {
    width: 100%;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-family: inherit;

    font-size: 14px;

    resize: vertical;
}

#formSoal textarea:focus,
#formSoal select:focus {
    outline: none;

    border-color: #2563eb;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#formSoal input[type="file"] {
    display: block;

    width: 100%;

    margin-top: 8px;

    font-size: 13px;
}

#formSoal small {
    display: block;

    color: #6b7280;

    margin-top: 6px;
}

.pilihan-form {
    padding: 14px;

    margin-bottom: 12px;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    background: #f9fafb;
}

.pilihan-form label {
    display: block;

    color: #111827;

    font-size: 14px;

    font-weight: 600;

    margin-bottom: 6px;
}

#formSoal #inputA,
#formSoal #inputB,
#formSoal #inputC,
#formSoal #inputD,
#formSoal #inputE {
    height: 42px;

    min-height: 42px;

    max-height: 42px;

    padding: 8px 10px;

    font-size: 14px;

    line-height: 1.4;

    resize: none;
}

.image-preview {
    margin-top: 12px;
}

.image-preview:empty {
    display: none;
}

.preview-wrapper {
    display: inline-flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 8px;
}

.preview-wrapper img {
    max-width: 350px;

    max-height: 250px;

    width: auto;

    height: auto;

    object-fit: contain;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    padding: 5px;

    background: white;
}

.preview-wrapper button {
    border: none;

    padding: 7px 10px;

    border-radius: 6px;

    background: #fee2e2;

    color: #dc2626;

    font-size: 12px;
}

.modal-soal-footer {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding-top: 20px;

    margin-top: 10px;

    border-top: 1px solid #e5e7eb;
}

.cancel-button,
.save-button {
    border: none;

    padding: 11px 18px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;
}

.cancel-button {
    background: #f3f4f6;

    color: #374151;
}

.cancel-button:hover {
    background: #e5e7eb;
}

.save-button {
    background: #2563eb;

    color: white;
}

.save-button:hover {
    background: #1d4ed8;
}


/* =========================================================
   DATA SISWA
   ========================================================= */

.student-toolbar {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 20px;
}

.student-toolbar input,
.hasil-toolbar input {
    flex: 1;

    padding: 12px 15px;

    border: 1px solid #ddd;

    border-radius: 8px;

    font-size: 14px;
}

.student-toolbar input:focus,
.hasil-toolbar input:focus {
    outline: none;

    border-color: #2563eb;
}

.admin-select {
    flex: 1;

    padding: 12px 15px;

    border: 1px solid #ddd;

    border-radius: 8px;

    font-size: 14px;

    background: white;
}

.admin-select:focus {
    outline: none;

    border-color: #2563eb;
}


/* =========================================================
   MONITORING
   ========================================================= */

.status-badge {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 600;
}

.status-allowed {
    background: #dcfce7;

    color: #166534;
}

.status-locked {
    background: #fee2e2;

    color: #991b1b;
}

.monitoring-stats {
    grid-template-columns: repeat(3, 1fr);
}

.monitoring-delete-button {
    border: none;

    background: #fee2e2;

    color: #dc2626;

    padding: 7px 12px;

    border-radius: 7px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.monitoring-delete-button:hover {
    background: #fecaca;

    color: #b91c1c;
}


/* =========================================================
   STATUS SISWA ONLINE / OFFLINE
   ========================================================= */

.status-online {
    background: #dcfce7;
    color: #166534;
}

.status-offline {
    background: #e5e7eb;
    color: #4b5563;
}

.force-logout-button {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.force-logout-button:hover {
    background: #fecaca;
}

.force-logout-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================================
   HASIL UJIAN ADMIN
   ========================================================= */

.hasil-stats {
    grid-template-columns: repeat(4, 1fr);
}

.hasil-panel {
    margin-bottom: 35px;
}

.hasil-toolbar {
    display: flex;

    gap: 15px;

    margin-bottom: 20px;

    align-items: center;
}

.hasil-ringkasan {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    width: 100%;

    margin: 20px 0;
}

.hasil-item {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 15px 10px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 10px;
}

.hasil-label {
    font-size: 13px;

    color: #6b7280;

    margin-bottom: 5px;
}

.hasil-item strong {
    font-size: 22px;

    color: #1f2937;
}

.hasil-tanggal {
    margin: 15px 0;

    font-size: 13px;

    color: #6b7280;

    text-align: center;
}


/* =========================================================
   MODAL DETAIL HASIL UJIAN
   ========================================================= */

.hasil-detail-modal {
    width: 100%;

    max-width: 600px;
}

.detail-hasil-content {
    display: flex;

    flex-direction: column;

    gap: 0;

    margin-top: 10px;
}

.detail-hasil-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 0;

    border-bottom: 1px solid #e5e7eb;
}

.detail-hasil-row span {
    color: #2563eb;

    font-size: 14px;

    font-weight: 600;
}

.detail-hasil-row strong {
    color: #111827;

    font-size: 14px;

    text-align: right;
}

#detailNilai {
    color: #16a34a;

    font-size: 20px;
}

#detailBenar {
    color: #16a34a;
}

#detailSalah {
    color: #dc2626;
}

#detailStatus {
    color: #2563eb;
}

.modal-footer {
    display: flex;

    justify-content: flex-end;

    margin-top: 20px;
}

.hasil-detail-modal .modal-footer {
    display: flex;

    justify-content: flex-end;

    margin-top: 20px;
}

.score-good {
    color: #16a34a;
}

.score-average {
    color: #dc2626;
}


/* =========================================================
   JADWAL UJIAN
   ========================================================= */

.jadwal-form-panel {
    margin-bottom: 30px;
}

.jadwal-form-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.form-actions {
    display: flex;

    gap: 10px;

    margin-top: 25px;
}

.primary-button,
.secondary-button {
    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;
}

.primary-button {
    background: #2563eb;

    color: white;
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    background: #e5e7eb;

    color: #374151;
}

.secondary-button:hover {
    background: #d1d5db;
}

.jadwal-toolbar {
    display: flex;

    gap: 15px;

    margin-bottom: 20px;

    align-items: center;
}

.jadwal-toolbar select,
.jadwal-toolbar input {
    flex: 1;

    padding: 12px 15px;

    border: 1px solid #ddd;

    border-radius: 8px;

    font-size: 14px;

    background: white;
}

.jadwal-toolbar select:focus,
.jadwal-toolbar input:focus {
    outline: none;

    border-color: #2563eb;
}

.status-pending {
    background: #fef3c7;

    color: #92400e;
}


/* =========================================================
   STATUS UJIAN SISWA
   ========================================================= */

.exam-status {
    margin: 8px 0 4px;

    font-size: 13px;

    font-weight: 600;
}

.exam-status-pending {
    color: #d97706;
}

.exam-status-active {
    color: #16a34a;
}

.exam-status-finished {
    color: #2563eb;
}

.exam-status-locked {
    color: #64748b;
}


/* =========================================================
   KELOLA MATA PELAJARAN
   ========================================================= */

.subject-management {
    padding: 30px 35px;
}

.subject-management-header {
    background: white;

    padding: 25px;

    border-radius: 12px;

    margin-bottom: 20px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}

.subject-management-header h2 {
    margin-bottom: 5px;
}

.subject-management-header p {
    color: #64748b;

    font-size: 13px;
}

.add-subject-button {
    width: auto;

    padding: 11px 18px;

    background: #2563eb;

    color: white;

    border: none;

    border-radius: 7px;

    font-weight: bold;
}

.add-subject-button:hover {
    background: #1d4ed8;
}

.subject-management-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.subject-management-card {
    background: white;

    padding: 25px;

    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    display: flex;

    align-items: center;

    gap: 15px;
}

.subject-management-icon {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    background: #eff6ff;

    border-radius: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 27px;
}

.subject-management-info {
    flex: 1;

    min-width: 0;
}

.subject-management-info h3 {
    margin-bottom: 5px;

    font-size: 16px;
}

.subject-management-info p {
    color: #64748b;

    font-size: 13px;
}

.subject-management-actions {
    display: flex;

    gap: 7px;
}

.subject-management-actions button {
    width: auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */


/* Tablet besar */

@media (max-width: 1000px) {

    .admin-stats,
    .monitoring-stats,
    .hasil-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-content-grid {
        grid-template-columns: 1fr;
    }
}


/* Tablet */

@media (max-width: 900px) {

    .jadwal-form-grid {
        grid-template-columns: 1fr;
    }

    .jadwal-toolbar {
        flex-wrap: wrap;
    }

    .jadwal-toolbar select,
    .jadwal-toolbar input {
        min-width: 200px;
    }
}


/* Tablet kecil */

@media (max-width: 800px) {

    .subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .exam-content {
        grid-template-columns: 1fr;
    }

    .question-navigation {
        order: -1;
    }

    .subject-management-grid {
        grid-template-columns: 1fr;
    }

    .subject-management {
        padding: 20px;
    }
}


/* Mobile besar */

@media (max-width: 700px) {

    .admin-sidebar {
        width: 200px;
    }

    .admin-header {
        padding: 20px;
    }

    .admin-stats {
        padding: 20px;
    }

    .admin-content-grid {
        padding: 0 20px 20px;
    }

    .question-management {
        padding: 20px;
    }

    .question-toolbar {
        flex-direction: column;

        align-items: stretch;
    }

    .subject-filter select,
    #filterMapel {
        width: 100%;
    }

    .add-question-button {
        width: 100%;
    }

    .student-toolbar,
    .hasil-toolbar {
        flex-direction: column;

        align-items: stretch;
    }

    .student-toolbar .admin-select,
    .hasil-toolbar .admin-select,
    .hasil-toolbar input {
        width: 100%;
    }

    .jadwal-toolbar {
        flex-direction: column;

        align-items: stretch;
    }

    .jadwal-toolbar select,
    .jadwal-toolbar input {
        width: 100%;

        min-width: 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .question-card-header,
    .question-header,
    .soal-card-header {
        flex-direction: column;

        align-items: flex-start;
    }

    .question-actions {
        width: 100%;
    }

    .preview-wrapper img {
        max-width: 100%;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-soal {
        max-height: 95vh;

        border-radius: 10px;
    }

    .modal-soal-header {
        padding: 17px;
    }

    #formSoal {
        padding: 17px;
    }

    .soal-card {
        padding: 15px;
    }

    .modal-soal-footer {
        flex-direction: column;
    }

    .cancel-button,
    .save-button {
        width: 100%;
    }

    .monitoring-stats,
    .hasil-stats {
        grid-template-columns: 1fr;
    }
}


/* Mobile */

@media (max-width: 550px) {

    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;

        min-height: auto;
    }

    .admin-menu {
        display: grid;

        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar-bottom {
        margin-top: 20px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

    .subject-management-header {
        flex-direction: column;

        align-items: stretch;
    }

    .add-subject-button {
        width: 100%;
    }

    .subject-management-card {
        flex-wrap: wrap;
    }

    .subject-management-actions {
        width: 100%;
    }

    .subject-management-actions button {
        flex: 1;
    }
}


/* =========================================================
   MOBILE 500px
   ========================================================= */

@media (max-width: 500px) {

    .subject-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 20px;
    }

    .student-info,
    .subject-section {
        width: 92%;
    }


    /* LOGIN */

    .login-container {
        grid-template-columns: 1fr;

        margin: 10px;

        border-radius: 15px;
    }

    .login-info {
        padding: 35px 30px;

        text-align: center;

        align-items: center;
    }

    .login-info h1 {
        font-size: 26px;
    }

    .info-item {
        justify-content: flex-start;

        text-align: left;
    }

    .login-box {
        padding: 40px 30px;
    }


    /* HEADER UJIAN */

    .exam-header {
        padding: 15px;

        gap: 10px;
    }

    .exam-header h1 {
        font-size: 18px;
    }

    .exam-header p {
        font-size: 12px;
    }

    .timer {
        font-size: 15px;

        padding: 10px;

        white-space: nowrap;
    }


    /* AREA SOAL */

    .exam-content {
        width: 94%;

        margin: 20px auto;
    }

    .question-area {
        padding: 20px;
    }

    .question-box h2 {
        font-size: 17px;

        line-height: 1.5;
    }


    /* PILIHAN */

    #pilihan {
        width: 100%;

        display: flex;

        flex-direction: column;

        gap: 8px;
    }

    #pilihan .option {
        width: 100%;

        display: flex;

        flex-direction: row;

        padding: 11px 12px;
    }


    /* NOMOR SOAL */

    #nomorSoalContainer,
    #questionNumbers {
        grid-template-columns: repeat(5, 1fr);
    }

    .question-number-button {
        height: 38px;

        font-size: 13px;
    }


    /* NAVIGASI */

    .navigation {
        flex-direction: column;
    }

    .navigation button {
        width: 100%;
    }


    /* HASIL */

    .hasil-ringkasan {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   MOBILE 600px - MODAL HASIL
   ========================================================= */

@media (max-width: 600px) {

    .hasil-detail-modal {
        width: 92%;
    }

    .detail-hasil-row {
        gap: 15px;
    }
}
/* =====================================================
   PILIHAN JAWABAN UJIAN
   ===================================================== */

#pilihan {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 20px;
}


#pilihan .pilihan-jawaban {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;

    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box;

    padding: 12px 15px;
    margin: 0 !important;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;

    cursor: pointer;

    float: none !important;
    clear: both !important;
}


#pilihan .pilihan-jawaban:hover {
    background: #f8fafc;
}


#pilihan .pilihan-jawaban input[type="radio"] {
    flex: 0 0 auto;
    margin: 7px 10px 0 0;
}


#pilihan .huruf-pilihan {
    flex: 0 0 30px;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    border-radius: 50%;

    background: #eff6ff;
    color: #2563eb;

    font-weight: bold;
}


#pilihan .isi-pilihan {
    flex: 1;

    min-width: 0;

    display: block;

    line-height: 1.4;

    word-wrap: break-word;
    overflow-wrap: break-word;
}


#pilihan .gambar-pilihan {
    display: block;

    max-width: 300px;
    max-height: 180px;

    width: auto;
    height: auto;

    margin-top: 8px;

    object-fit: contain;

    border: 1px solid #ddd;
    border-radius: 6px;

    padding: 4px;

    background: white;
}
/* =====================================================
   NOMOR SOAL
   ===================================================== */

#nomorSoalContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


#nomorSoalContainer .nomor-soal {
    width: 40px;
    height: 40px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #ffffff;
    color: #333333;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


/* SOAL YANG SEDANG AKTIF */

#nomorSoalContainer .nomor-soal.current {
    border: 2px solid #2563eb;
}


/* SOAL SUDAH DIJAWAB */

#nomorSoalContainer .nomor-soal.answered {
    background: #22c55e !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}


/* SOAL AKTIF + SUDAH DIJAWAB */

#nomorSoalContainer .nomor-soal.current.answered {
    background: #22c55e !important;
    border: 3px solid #2563eb !important;
    color: #ffffff !important;
}


/* HOVER */

#nomorSoalContainer .nomor-soal:hover {
    transform: scale(1.05);
}
/* =====================================================
   LOGIN SISWA + GURU
   ===================================================== */

.login-body {
    min-height: 100vh;

    margin: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    background: #f1f5f9;
}


.login-container {
    width: 100%;
    max-width: 450px;

    background: #ffffff;

    border-radius: 16px;

    padding: 30px;

    box-sizing: border-box;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   HEADER
   ===================================================== */

.login-header {
    text-align: center;

    margin-bottom: 25px;
}


.login-logo {
    width: 65px;
    height: 65px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #2563eb;

    color: #ffffff;

    font-size: 32px;

    font-weight: bold;
}


.login-header h1 {
    margin: 0;

    font-size: 26px;

    color: #1e293b;
}


.login-header p {
    margin-top: 8px;

    color: #64748b;
}


/* =====================================================
   TAB
   ===================================================== */

.login-tabs {
    display: flex;

    gap: 8px;

    margin-bottom: 25px;

    padding: 5px;

    background: #f1f5f9;

    border-radius: 10px;
}


.login-tab {
    flex: 1;

    border: none;

    padding: 11px 8px;

    border-radius: 7px;

    background: transparent;

    color: #64748b;

    font-weight: 600;

    cursor: pointer;
}


.login-tab.active {
    background: #ffffff;

    color: #2563eb;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   FORM
   ===================================================== */

.login-form-container h2 {
    margin-bottom: 5px;

    color: #1e293b;
}


.form-description {
    margin-top: 0;

    margin-bottom: 20px;

    color: #64748b;

    font-size: 14px;
}


.form-group {
    margin-bottom: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;

    color: #334155;
}


.form-group input {
    width: 100%;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    outline: none;

    font-size: 15px;
}


.form-group input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* =====================================================
   PASSWORD
   ===================================================== */

.password-wrapper {
    position: relative;
}


.password-wrapper input {
    padding-right: 45px;
}


.show-password {
    position: absolute;

    right: 8px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    cursor: pointer;

    font-size: 18px;
}


/* =====================================================
   BUTTON LOGIN
   ===================================================== */

.btn-login {
    width: 100%;

    padding: 13px;

    border: none;

    border-radius: 8px;

    background: #2563eb;

    color: #ffffff;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;
}


.btn-login:hover {
    background: #1d4ed8;
}


/* =====================================================
   PESAN
   ===================================================== */

.login-message {
    min-height: 22px;

    margin-top: 18px;

    text-align: center;

    font-size: 14px;
}


.login-message.error {
    color: #dc2626;
}


.login-message.success {
    color: #16a34a;
}


/* =====================================================
   FOOTER
   ===================================================== */

.login-footer {
    margin-top: 25px;

    padding-top: 15px;

    border-top: 1px solid #e2e8f0;

    text-align: center;

    color: #94a3b8;

    font-size: 13px;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 500px) {

    .login-body {
        padding: 10px;
    }


    .login-container {
        padding: 22px;
    }


    .login-header h1 {
        font-size: 22px;
    }


    .login-tab {
        font-size: 13px;
    }

}
/* ==========================================
   SCROLL TABEL DATA SISWA
   ========================================== */

.table-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}


/* ==========================================
   TABEL
   ========================================== */

.table-container .admin-table {
    width: 100%;
    border-collapse: collapse;
}


/* ==========================================
   HEADER TABEL TETAP DI ATAS
   ========================================== */

.table-container .admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
}


/* ==========================================
   AGAR HEADER TIDAK TRANSPARAN
   ========================================== */

.table-container .admin-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}
/* =========================================
   MODAL TAMBAH SISWA
========================================= */

.modal-siswa {
    display: none;
    position: fixed;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    z-index: 9999;

    align-items: center;
    justify-content: center;

    padding: 20px;

    backdrop-filter: blur(3px);
}


/* Saat modal aktif */
.modal-siswa.show {
    display: flex;
}


/* Kotak modal */
.modal-siswa-content {
    width: 100%;
    max-width: 500px;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.20);

    overflow: hidden;

    animation: modalSiswaMasuk 0.2s ease;
}


/* Animasi */
@keyframes modalSiswaMasuk {

    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* Header */
.modal-siswa-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    padding: 22px 24px;

    border-bottom: 1px solid #e5e7eb;
}


.modal-siswa-header h2 {
    margin: 0;

    font-size: 21px;

    color: #111827;
}


.modal-siswa-header p {
    margin: 5px 0 0;

    color: #6b7280;

    font-size: 14px;
}


/* Tombol X */
.modal-close {
    border: none;

    background: transparent;

    font-size: 28px;

    line-height: 1;

    color: #6b7280;

    cursor: pointer;

    padding: 0;

    width: 32px;
    height: 32px;

    border-radius: 8px;
}


.modal-close:hover {
    background: #f3f4f6;

    color: #111827;
}


/* Form */
#formTambahSiswa {
    padding: 24px;
}


.form-group {
    margin-bottom: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;

    font-weight: 600;

    color: #374151;
}


.form-group input,
.form-group select {
    width: 100%;

    box-sizing: border-box;

    padding: 11px 13px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;

    color: #111827;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.form-group input:focus,
.form-group select:focus {

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


.form-group input::placeholder {
    color: #9ca3af;
}


/* Footer modal */
.modal-siswa-footer {

    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}


/* Tombol */
.modal-siswa-footer .btn {

    min-width: 110px;

    padding: 10px 16px;

    border-radius: 8px;

    border: none;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}


.modal-siswa-footer .btn-primary {

    background: #2563eb;

    color: white;
}


.modal-siswa-footer .btn-primary:hover {

    background: #1d4ed8;

}


.modal-siswa-footer .btn-secondary {

    background: #e5e7eb;

    color: #374151;
}


.modal-siswa-footer .btn-secondary:hover {

    background: #d1d5db;

}


/* Responsive HP */
@media (max-width: 600px) {

    .modal-siswa {
        padding: 12px;
    }

    .modal-siswa-content {
        max-width: 100%;
    }

    #formTambahSiswa {
        padding: 20px;
    }

    .modal-siswa-header {
        padding: 18px 20px;
    }

    .modal-siswa-footer {
        flex-direction: column-reverse;
    }

    .modal-siswa-footer .btn {
        width: 100%;
    }

}
/* =========================================================
   MOBILE RESPONSIVE FIX
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================
   TABLET DAN MOBILE
   ========================= */

@media (max-width: 700px) {

    body {
        font-size: 14px;
    }

    /* =========================
       HALAMAN LOGIN
       ========================= */

    .login-container {
        width: calc(100% - 30px);
        max-width: 420px;
        margin: 20px auto;
        padding: 20px;
    }

    .login-tabs {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .login-tab,
    .btn-login {
        width: 100%;
    }

    /* =========================
       DASHBOARD SISWA
       ========================= */

    .dashboard {
        width: 100%;
        padding: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 18px;
    }

    .dashboard-header h1 {
        font-size: 24px;
    }

    .logout-button {
        width: 100%;
    }

    .student-info {
        padding: 18px;
    }

    .student-info h2 {
        font-size: 20px;
        line-height: 1.4;
    }

    .subject-section {
        padding: 18px;
    }

    .subject-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .subject-card {
        width: 100%;
        min-width: 0;
    }

    .subject-card button {
        width: 100%;
    }

    /* =========================
       HALAMAN UJIAN
       ========================= */

    .exam-container {
        width: 100%;
        min-height: 100vh;
        padding: 0;
    }

    .exam-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .exam-header h1 {
        font-size: 22px;
        word-break: break-word;
    }

    .exam-header p {
        word-break: break-word;
    }

    .timer {
        width: 100%;
        text-align: center;
        font-size: 20px;
    }

    .exam-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 12px;
        gap: 14px;
    }

    .question-area,
    .question-navigation {
        width: 100%;
        min-width: 0;
    }

    .question-navigation {
        order: -1;
        padding: 14px;
    }

    .question-box {
        width: 100%;
        padding: 15px;
        overflow-wrap: anywhere;
    }

    #pertanyaan {
        font-size: 19px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    #gambarPertanyaan {
        display: block;
        max-width: 100%;
        max-height: 280px;
        object-fit: contain;
        margin: 10px auto;
    }

    #pilihan {
        width: 100%;
    }

    #pilihan .option {
        width: 100%;
        min-width: 0;
        padding: 11px;
        overflow-wrap: anywhere;
    }

    #pilihan .option-content {
        min-width: 0;
        width: 100%;
    }

    #pilihan .option-content span {
        overflow-wrap: anywhere;
    }

    #pilihan .option-content img {
        max-width: 100% !important;
        height: auto;
    }

    .navigation {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .navigation button,
    .submit-button {
        width: 100%;
        min-height: 44px;
    }

    #nomorSoalContainer {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .question-number-button {
        width: 100%;
        min-height: 40px;
    }

    /* =========================
       HASIL UJIAN
       ========================= */

    .result-container {
        width: 100%;
        padding: 15px;
    }

    .result-box {
        width: 100%;
        padding: 20px 15px;
    }

    .result-box h1 {
        font-size: 24px;
    }

    .result-info,
    .hasil-ringkasan {
        width: 100%;
    }

    .hasil-ringkasan {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-box button {
        width: 100%;
    }

    /* =========================
       ADMIN LAYOUT
       ========================= */

    .admin-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .admin-logo {
        padding: 16px;
    }

    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px;
    }

    .admin-menu a {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
        padding: 10px 8px;
        text-align: center;
        font-size: 13px;
    }

    .admin-sidebar-bottom {
        padding: 10px;
    }

    .admin-sidebar-bottom button {
        width: 100%;
    }

    .admin-main {
        width: 100%;
        min-width: 0;
        margin-left: 0;
        padding: 0;
    }

    .admin-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 18px;
    }

    .admin-header h1 {
        font-size: 24px;
        word-break: break-word;
    }

    .admin-profile {
        width: 100%;
    }

    .admin-stats,
    .monitoring-stats,
    .hasil-stats {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 12px;
    }

    .admin-content-grid {
        grid-template-columns: 1fr;
        padding: 0 15px 15px;
    }

    .admin-panel,
    .subject-management,
    .question-management {
        width: 100%;
        min-width: 0;
        padding: 15px;
    }

    /* =========================
       ADMIN FORM DAN TOOLBAR
       ========================= */

    .panel-header,
    .subject-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .panel-header button,
    .subject-management-header button,
    .add-button,
    .add-subject-button,
    .add-question-button {
        width: 100%;
    }

    .student-toolbar,
    .hasil-toolbar,
    .jadwal-toolbar,
    .question-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .student-toolbar > *,
    .hasil-toolbar > *,
    .jadwal-toolbar > *,
    .question-toolbar > * {
        width: 100%;
        min-width: 0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .admin-select,
    .jadwal-toolbar input,
    .jadwal-toolbar select {
        width: 100%;
        max-width: 100%;
    }

    .form-actions,
    .modal-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .form-actions button,
    .modal-actions button {
        width: 100%;
    }

    /* =========================
       KARTU ADMIN
       ========================= */

    .subject-management-grid {
        grid-template-columns: 1fr;
    }

    .subject-management-card {
        width: 100%;
        min-width: 0;
        padding: 16px;
        flex-wrap: wrap;
    }

    .subject-management-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .subject-management-actions button {
        flex: 1 1 100%;
        width: 100%;
    }

    /* =========================
       MODAL ADMIN
       ========================= */

    .modal-overlay,
    .modal {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .modal-soal,
    .modal-box {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 16px;
    }

    /* =========================
       TABEL ADMIN
       ========================= */

    .admin-panel,
    .card,
    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 650px;
        width: 100%;
    }

    th,
    td {
        white-space: nowrap;
        font-size: 13px;
        padding: 9px;
    }

    /* =========================
       GAMBAR SOAL
       ========================= */

    .gambar-pertanyaan-ujian,
    .gambar-pilihan-ujian,
    .image-preview img {
        max-width: 100%;
        height: auto;
    }
}

/* =========================
   HP KECIL
   ========================= */

@media (max-width: 400px) {

    .dashboard,
    .exam-content,
    .result-container {
        padding: 10px;
    }

    .subject-section,
    .student-info,
    .question-box,
    .question-navigation,
    .result-box {
        padding: 12px;
    }

    .admin-menu a {
        flex-basis: 100%;
        min-width: 0;
    }

    #nomorSoalContainer {
        grid-template-columns: repeat(4, 1fr);
    }

    #pertanyaan {
        font-size: 17px;
    }

    .exam-header h1 {
        font-size: 20px;
    }
}
.export-button {
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    background: #16a34a;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.export-button:hover {
    background: #15803d;
}

@media (max-width: 700px) {
    .export-button {
        width: 100%;
        margin-top: 10px;
    }
}