/* ==============================================================================
   SIPANDAI-21 - CBT (COMPUTER-BASED TEST) DESIGN SYSTEM & STYLESHEET
   Sistem Antarmuka Ujian Berbasis Komputer Modern Standar ANBK & UTBK
   ============================================================================== */

/* --- CBT EXAM ROOM FULLSCREEN & CONTAINER --- */
.cbt-exam-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 2rem);
  min-height: 600px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

/* Header Ruang Ujian */
.cbt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #ffffff;
  border-bottom: 2px solid #3b82f6;
  z-index: 10;
}

.cbt-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cbt-badge-mapel {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cbt-title-group h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  line-height: 1.2;
}

.cbt-title-group span {
  font-size: 0.78rem;
  color: #bfdbfe;
}

/* Timer Countdown */
.cbt-timer-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cbt-timer-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.cbt-timer-display {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
}

.cbt-timer-display.warning {
  color: #fbbf24;
  animation: pulseWarning 1.5s infinite;
}

.cbt-timer-display.danger {
  color: #f87171;
  animation: pulseDanger 0.8s infinite;
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes pulseDanger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); text-shadow: 0 0 10px rgba(239, 68, 68, 0.7); }
}

/* User & Font Zoom Controls */
.cbt-header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cbt-font-zoom-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.cbt-btn-zoom {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.cbt-btn-zoom:hover, .cbt-btn-zoom.active {
  background: rgba(255, 255, 255, 0.3);
}

/* --- CBT MAIN BODY LAYOUT (QUESTION & NAVIGATOR) --- */
.cbt-body-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left/Main Question Area */
.cbt-question-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  background: var(--bg-surface);
}

.cbt-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.cbt-question-number-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cbt-q-number {
  background: var(--primary-500);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-sm);
}

.cbt-q-type-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

.cbt-q-weight {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Question Content Box */
.cbt-question-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 1.75rem;
}

.cbt-question-text.font-sm { font-size: 0.95rem; line-height: 1.65; }
.cbt-question-text.font-md { font-size: 1.08rem; line-height: 1.75; }
.cbt-question-text.font-lg { font-size: 1.25rem; line-height: 1.85; }

/* Question Image Container */
.cbt-question-text img,
.soal-inline-img,
.soal-preview-img {
  max-width: 100%;
  max-height: 380px;
  height: auto;
  border-radius: 12px;
  border: 1.5px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: block;
  margin: 1rem auto;
  cursor: zoom-in;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  padding: 6px;
}

.cbt-question-text img:hover,
.soal-inline-img:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  border-color: var(--primary-400, #60a5fa);
}

/* Interactive Multiple Choice Options */
.cbt-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.cbt-option-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.35rem;
  border: 2px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  background: var(--bg-card, #ffffff);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cbt-option-item:hover {
  border-color: var(--primary-400, #60a5fa);
  background: var(--primary-50, #eff6ff);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.cbt-option-item.selected {
  border-color: var(--primary-600, #2563eb);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 4px 12px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .cbt-option-item {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .cbt-option-item:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: #60a5fa;
}

[data-theme="dark"] .cbt-option-item.selected {
  background: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.cbt-option-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface, #f8fafc);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-muted, #64748b);
  transition: all 0.2s ease;
}

.cbt-option-item:hover .cbt-option-key {
  border-color: var(--primary-500, #3b82f6);
  color: var(--primary-600, #2563eb);
}

.cbt-option-item.selected .cbt-option-key {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.cbt-option-text {
  font-size: 1rem;
  color: var(--text-main, #1e293b);
  line-height: 1.55;
  flex: 1;
}

.cbt-option-text img {
  max-width: 100%;
  max-height: 160px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  margin: 0.4rem 0;
  display: block;
  background: #ffffff;
  padding: 3px;
}

.cbt-option-radio-indicator {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color, #cbd5e1);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cbt-option-item.selected .cbt-option-radio-indicator {
  border-color: var(--primary-600, #2563eb);
  background: var(--primary-600, #2563eb);
}

.cbt-option-item.selected .cbt-option-radio-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

/* Benar / Salah Buttons */
.cbt-true-false-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cbt-tf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.cbt-tf-btn.true-btn:hover, .cbt-tf-btn.true-btn.selected {
  border-color: #10b981;
  background: #ecfdf5;
  color: #059669;
}

.cbt-tf-btn.false-btn:hover, .cbt-tf-btn.false-btn.selected {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}

/* Isian Singkat & Essay Inputs */
.cbt-input-isian {
  width: 100%;
  max-width: 480px;
  padding: 0.9rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.cbt-input-isian:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cbt-textarea-essay {
  width: 100%;
  min-height: 160px;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  line-height: 1.6;
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.cbt-textarea-essay:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Bottom Navigation Bar */
.cbt-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-color);
  gap: 1rem;
}

.cbt-ragu-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.cbt-ragu-checkbox:hover {
  background: #fde68a;
}

[data-theme="dark"] .cbt-ragu-checkbox {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.cbt-ragu-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #d97706;
  cursor: pointer;
}

/* --- RIGHT QUESTION NAVIGATOR SIDEBAR (GRID) --- */
.cbt-navigator-sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cbt-navigator-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.cbt-navigator-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Legend Colors */
.cbt-legend-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cbt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cbt-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.cbt-dot.done { background: #10b981; }
.cbt-dot.doubt { background: #f59e0b; }
.cbt-dot.empty { background: #cbd5e1; }

/* Question Grid Numbers */
.cbt-numbers-grid {
  flex: 1;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  align-content: start;
  overflow-y: auto;
}

.cbt-nav-btn {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.cbt-nav-btn:hover {
  border-color: var(--primary-500);
  transform: scale(1.05);
}

/* State: Sudah Dijawab */
.cbt-nav-btn.answered {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

/* State: Ragu-Ragu */
.cbt-nav-btn.doubt {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
}

/* State: Aktif Terpilih */
.cbt-nav-btn.active {
  box-shadow: 0 0 0 3px #2563eb, 0 4px 10px rgba(37, 99, 235, 0.3);
  transform: scale(1.08);
  z-index: 2;
}

.cbt-nav-btn-answer-preview {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 1px;
}

/* Navigator Footer / Selesai Button */
.cbt-navigator-footer {
  padding: 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.cbt-btn-finish {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s;
}

.cbt-btn-finish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* --- ANTI-CHEAT OVERLAY & WARNING BANNER --- */
.cbt-anticheat-banner {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  color: #991b1b;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .cbt-anticheat-banner {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.cbt-violation-counter {
  background: #dc2626;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Modal Anti-Cheat Violation Warning */
.cbt-cheat-warning-modal {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.cbt-cheat-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: shakeWarning 0.5s ease;
}

@keyframes shakeWarning {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* --- CBT LIVE PROCTORING DASHBOARD (GURU / PENGAWAS) --- */
.cbt-proctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.cbt-student-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  transition: all 0.2s;
}

.cbt-student-card.status-active {
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.cbt-student-card.status-locked {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3), 0 8px 24px rgba(239, 68, 68, 0.15) !important;
  animation: cardSirenPulse 1.2s infinite alternate !important;
}

[data-theme="dark"] .cbt-student-card.status-locked {
  background: rgba(239, 68, 68, 0.15) !important;
}

@keyframes cardSirenPulse {
  0% { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4), 0 4px 12px rgba(239, 68, 68, 0.2); }
  100% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.8), 0 8px 25px rgba(239, 68, 68, 0.35); }
}

@keyframes sirenFlash {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.75; transform: scale(1.03); }
}

.siren-pulse {
  animation: cardSirenPulse 1.2s infinite alternate !important;
}

.cbt-student-card.status-warning {
  border-color: #f59e0b;
  background: #fffbeb;
}

[data-theme="dark"] .cbt-student-card.status-warning {
  background: rgba(245, 158, 11, 0.1);
}

.cbt-student-card.status-done {
  border-color: #0284c7;
  background: #f0f9ff;
  opacity: 0.95;
}

[data-theme="dark"] .cbt-student-card.status-done {
  background: rgba(2, 132, 199, 0.1);
}

.cbt-student-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cbt-student-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cbt-student-meta h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.cbt-student-meta p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.cbt-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.75rem 0 0.5rem;
}

.cbt-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.cbt-student-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cbt-proctor-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* --- SMARTPHONE LIVE MONITOR MOCKUP & TELEMETRY --- */
.cbt-phone-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.cbt-phone-frame {
  width: 320px;
  height: 540px;
  background: #1e293b;
  border: 10px solid #0f172a;
  border-radius: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.cbt-phone-notch {
  width: 120px;
  height: 18px;
  background: #0f172a;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbt-phone-notch-camera {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #334155;
}

.cbt-phone-screen {
  flex: 1;
  background: var(--bg-surface, #ffffff);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: inherit;
  position: relative;
}

.cbt-phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 14px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.cbt-phone-screen-content {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cbt-phone-warning-overlay {
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.94);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  z-index: 20;
  animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.85; }
}

.cbt-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.cbt-audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
}

.cbt-audit-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-color);
}

.cbt-timeline-item {
  position: relative;
  font-size: 0.82rem;
  line-height: 1.4;
}

.cbt-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.cbt-timeline-item.warning::before {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.cbt-timeline-item.danger::before {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.cbt-timeline-item.success::before {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cbt-timeline-time {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--text-muted);
}


/* --- HASIL & SERTIFIKAT CBT PRINTABLE CARD --- */
.cbt-result-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.cbt-result-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 4px solid #ffffff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cbt-result-score-val {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.cbt-result-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bfdbfe;
  font-weight: 700;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .cbt-navigator-sidebar {
    position: absolute;
    right: -320px;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: var(--shadow-xl);
  }

  .cbt-navigator-sidebar.open {
    right: 0;
  }

  .cbt-exam-container {
    height: calc(100vh - 1rem);
    border-radius: 0;
  }
}

/* ==============================================================================
   WORD DOCUMENT (.DOCX) IMPORT & QUESTION IMAGE STYLES
   ============================================================================== */

.btn-word {
  background: linear-gradient(135deg, #185abd 0%, #103f91 100%);
  color: #ffffff !important;
  border: 1px solid #103f91;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-word:hover {
  background: linear-gradient(135deg, #1f6fe5 0%, #144cb0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 90, 189, 0.35);
}

/* Question & Option Images */
.cbt-question-text img,
.cbt-option-text img,
.soal-inline-img,
.soal-preview-img {
  max-width: 100%;
  max-height: 380px;
  height: auto;
  border-radius: var(--radius-md, 8px);
  border: 1.5px solid var(--border-color, #e2e8f0);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  display: block;
  margin: 0.75rem 0;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  padding: 4px;
}

.cbt-question-text img:hover,
.cbt-option-text img:hover,
.soal-inline-img:hover {
  transform: scale(1.015);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Word Upload Dropzone */
.word-upload-dropzone {
  border: 2px dashed #3b82f6;
  background: #f8fafc;
  border-radius: var(--radius-lg, 12px);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

[data-theme="dark"] .word-upload-dropzone {
  background: rgba(30, 41, 59, 0.6);
  border-color: #3b82f6;
}

.word-upload-dropzone:hover,
.word-upload-dropzone.dragover {
  background: #eff6ff;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.word-upload-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #185abd 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Word Question Preview List */
.word-preview-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-top: 1rem;
}

.word-question-preview-card {
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: var(--bg-card, #ffffff);
  border-radius: var(--radius-md, 10px);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: border-color 0.2s ease;
}

.word-question-preview-card:hover {
  border-color: var(--primary-400, #60a5fa);
}

.word-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.word-q-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.word-q-option-pill {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-surface-elevated, #f8fafc);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.word-q-option-pill img {
  max-height: 120px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
  margin-top: 4px;
  display: block;
}

.word-q-option-pill.is-key {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px #10b981, 0 2px 6px rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .word-q-option-pill {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .word-q-option-pill.is-key {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: #10b981;
}

/* Image Lightbox */
.cbt-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}

.cbt-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  background: #ffffff;
  padding: 6px;
}

/* ==============================================================================
   CBT STRICT LOCKDOWN OVERLAY & ANTI-CHEAT ALARM
   ============================================================================== */
.cbt-lockdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: lockdownFadeIn 0.25s ease-out;
}

@keyframes lockdownFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.cbt-lockdown-box {
  background: #ffffff;
  border: 3px solid #dc2626;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(220, 38, 38, 0.45), 0 0 0 10px rgba(220, 38, 38, 0.15);
  position: relative;
  animation: lockdownPulse 2s infinite;
}

[data-theme="dark"] .cbt-lockdown-box {
  background: #1e1b2e;
  border-color: #ef4444;
}

@keyframes lockdownPulse {
  0%, 100% {
    box-shadow: 0 25px 50px -12px rgba(220, 38, 38, 0.45), 0 0 0 8px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 30px 60px -12px rgba(220, 38, 38, 0.65), 0 0 0 16px rgba(220, 38, 38, 0.35);
  }
}

.cbt-lockdown-icon {
  width: 76px;
  height: 76px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  animation: sirenFlash 0.6s infinite alternate;
}

@keyframes sirenFlash {
  from { transform: scale(1); background: #fee2e2; color: #dc2626; }
  to { transform: scale(1.1); background: #dc2626; color: #ffffff; }
}

.cbt-lockdown-title {
  color: #b91c1c;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .cbt-lockdown-title {
  color: #f87171;
}

.cbt-lockdown-alert {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  color: #991b1b;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

[data-theme="dark"] .cbt-lockdown-alert {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.cbt-lockdown-meta {
  background: var(--bg-surface-elevated, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  color: var(--text-main, #0f172a);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: left;
}

[data-theme="dark"] .cbt-lockdown-meta {
  background: #0f172a;
}

.cbt-unlock-form {
  background: #fff1f2;
  border: 2px dashed #f43f5e;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .cbt-unlock-form {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.4);
}

.cbt-unlock-input {
  text-transform: uppercase;
  text-align: center;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 4px;
  padding: 0.6rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  width: 100%;
  max-width: 240px;
  outline: none;
  transition: all 0.2s;
  background: #ffffff;
  color: #0f172a;
}

.cbt-unlock-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.cbt-unlock-input.shake {
  animation: shakeInput 0.5s ease;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); border-color: #dc2626; }
  15%, 45%, 75% { transform: translateX(-8px); border-color: #ef4444; }
  30%, 60%, 90% { transform: translateX(8px); border-color: #f87171; }
}

/* Siren flash animation for status badge */
@keyframes sirenFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.04); }
}

/* Card Siswa Terkunci di Layar Pengawas */
.cbt-student-card.status-locked {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3), 0 8px 24px rgba(220, 38, 38, 0.25);
  animation: cardAlarmPulse 1s infinite alternate;
}

[data-theme="dark"] .cbt-student-card.status-locked {
  background: rgba(220, 38, 38, 0.15);
  border-color: #ef4444;
}

@keyframes cardAlarmPulse {
  from { border-color: #dc2626; }
  to { border-color: #f97316; }
}

.cbt-auto-unlock-box {
  background: #fee2e2;
  border: 1.5px solid #f87171;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

[data-theme="dark"] .cbt-auto-unlock-box {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.cbt-unlock-code-badge {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #b91c1c;
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #fca5a5;
}

[data-theme="dark"] .cbt-unlock-code-badge {
  background: #0f172a;
  color: #fca5a5;
  border-color: #ef4444;
}

/* ==============================================================================
   CBT FULLSCREEN TERKUNCI (KIOSK MODE) STYLES
   Standar ANBK / UTBK - Layar Terkunci Penuh & Bebas Distraksi
   ============================================================================== */

html.cbt-locked-html,
body.cbt-fullscreen-active {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
  touch-action: pan-x pan-y !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -ms-user-select: none !important;
}

body.cbt-fullscreen-active .app-header,
body.cbt-fullscreen-active .app-sidebar,
body.cbt-fullscreen-active .mobile-menu-toggle,
body.cbt-fullscreen-active .header-search-bar,
body.cbt-fullscreen-active .btn-back-landing,
body.cbt-fullscreen-active .btn-header-logout {
  display: none !important;
}

body.cbt-fullscreen-active .app-layout {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
}

body.cbt-fullscreen-active .app-main {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

body.cbt-fullscreen-active .app-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body.cbt-fullscreen-active .cbt-exam-container {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Badge Status Fullscreen di Header CBT */
.cbt-fullscreen-badge-wrapper {
  display: flex;
  align-items: center;
}

.cbt-fullscreen-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  user-select: none;
}

.cbt-fullscreen-badge.active {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.cbt-fullscreen-badge.warning {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fecdd3;
  animation: badgeBlink 1s infinite alternate;
}

@keyframes badgeBlink {
  0% { opacity: 0.8; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.02); }
}

.cbt-fs-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.cbt-fs-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981, 0 0 16px #34d399;
  animation: pulseGreen 1.8s infinite;
}

.cbt-fs-dot.warning {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444, 0 0 16px #f87171;
  animation: pulseRed 0.8s infinite;
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

@keyframes pulseRed {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Tombol Re-Lock Fullscreen di Header */
.cbt-btn-relock-fs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cbt-btn-relock-fs:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Overlay Pengunci Layar Penuh (Fullscreen Enforce Overlay) */
.cbt-fullscreen-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(10, 15, 30, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fsOverlayFadeIn 0.3s ease-out;
}

@keyframes fsOverlayFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.cbt-fullscreen-lock-card {
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: 24px;
  max-width: 580px;
  width: 100%;
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.5), 0 0 0 8px rgba(59, 130, 246, 0.15);
  position: relative;
  animation: fsCardGlow 3s infinite alternate;
}

[data-theme="dark"] .cbt-fullscreen-lock-card {
  background: #111827;
  border-color: #60a5fa;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 8px rgba(96, 165, 250, 0.2);
}

@keyframes fsCardGlow {
  0% { box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.5), 0 0 0 6px rgba(59, 130, 246, 0.15); }
  100% { box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.65), 0 0 0 12px rgba(59, 130, 246, 0.3); }
}

.cbt-fs-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .cbt-fs-icon-wrap {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.3);
}

.cbt-fs-lock-icon {
  font-size: 2.5rem;
  line-height: 1;
  animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.cbt-fs-pill-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .cbt-fs-pill-tag {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.cbt-fs-title {
  color: #1e3a8a;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
  letter-spacing: -0.3px;
}

[data-theme="dark"] .cbt-fs-title {
  color: #93c5fd;
}

.cbt-fs-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #475569);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.cbt-fs-rules-box {
  background: var(--bg-surface-elevated, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

[data-theme="dark"] .cbt-fs-rules-box {
  background: #0f172a;
  border-color: #1e293b;
}

.cbt-fs-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-main, #0f172a);
  line-height: 1.45;
}

[data-theme="dark"] .cbt-fs-rule-item {
  color: #cbd5e1;
}

.cbt-fs-rule-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cbt-btn-enter-fs {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}

.cbt-btn-enter-fs:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(37, 99, 235, 0.6);
}

/* ==============================================================================
   CBT MOBILE OPTIMIZATIONS & DAFTAR SOAL DRAWER & LOCKDOWN OVERLAY FIX
   ============================================================================== */

.cbt-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cbt-sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cbt-btn-close-sidebar {
  display: none;
}

.cbt-btn-open-grid,
.cbt-btn-quick-finish,
.cbt-btn-quick-grid {
  cursor: pointer;
  transition: all 0.2s ease;
}

.cbt-btn-nav-finish {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.cbt-btn-nav-finish:hover {
  background: #047857;
  border-color: #047857;
}

/* Pastikan Layar Gembok & Lockdown Total Selalu Berfungsi & Nyaman di Ponsel */
.cbt-lockdown-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.cbt-lockdown-box {
  max-height: 92vh !important;
  overflow-y: auto !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: auto !important;
}

.cbt-fullscreen-lock-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-y: auto !important;
  padding: 1rem !important;
}

.cbt-fullscreen-lock-card {
  max-height: 92vh !important;
  overflow-y: auto !important;
  width: 100% !important;
  max-width: 540px !important;
  margin: auto !important;
}

@media (max-width: 900px) {
  .cbt-navigator-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: -340px !important;
    width: 320px !important;
    max-width: 86vw !important;
    z-index: 9999 !important;
    box-shadow: -6px 0 30px rgba(0, 0, 0, 0.35) !important;
    background: var(--bg-surface-elevated) !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .cbt-navigator-sidebar.open {
    right: 0 !important;
  }

  .cbt-btn-close-sidebar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    color: var(--text-main);
  }

  [data-theme="dark"] .cbt-btn-close-sidebar {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }
}

@media (max-width: 768px) {
  /* Header Mobile Rapih 2 Baris */
  .cbt-header {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.65rem 0.85rem !important;
    gap: 0.5rem !important;
  }

  .cbt-header-row-1 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .cbt-header-title-box {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    overflow: hidden !important;
    flex: 1 !important;
  }

  .cbt-badge-mapel {
    padding: 0.2rem 0.55rem !important;
    font-size: 0.68rem !important;
    white-space: nowrap !important;
  }

  .cbt-title-group h2 {
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 180px !important;
  }

  .cbt-header-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .cbt-btn-quick-grid {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .cbt-btn-quick-finish {
    padding: 0.3rem 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .cbt-header-row-2 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    width: 100% !important;
    padding-top: 0.35rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .cbt-student-info {
    font-size: 0.75rem !important;
    color: #bfdbfe !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 160px !important;
  }

  .cbt-header-status-box {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
  }

  .cbt-timer-wrapper {
    padding: 0.2rem 0.55rem !important;
    gap: 0.3rem !important;
  }

  .cbt-timer-label {
    font-size: 0.65rem !important;
  }

  .cbt-timer-display {
    font-size: 1.05rem !important;
  }

  .cbt-fullscreen-badge {
    padding: 0.25rem 0.55rem !important;
    font-size: 0.7rem !important;
    gap: 4px !important;
  }

  /* Anti-Cheat Banner Mobile */
  .cbt-anticheat-banner {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  .cbt-ac-text {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 0.35rem !important;
  }

  .cbt-ac-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  /* Bottom Nav Mobile 2-Baris */
  .cbt-bottom-nav {
    padding: 0.5rem 0.75rem !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
  }

  .cbt-bottom-nav-row-1 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }

  .cbt-bottom-nav-row-2 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }

  .cbt-btn-open-grid {
    flex: 1 !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    padding: 0.55rem 0.75rem !important;
    background: #eff6ff !important;
    border: 1.5px solid #3b82f6 !important;
    color: #1d4ed8 !important;
    border-radius: 10px !important;
  }

  .cbt-btn-nav-finish {
    flex: 1 !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    padding: 0.55rem 0.75rem !important;
    background: #059669 !important;
    border: 1.5px solid #059669 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35) !important;
  }

  .cbt-ragu-checkbox {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
  }

  .cbt-exam-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 99990 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .cbt-body-layout {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .cbt-question-pane {
    flex: 1 !important;
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.85rem 0.85rem 8.5rem !important; /* Safe spacing above bottom navbar */
  }

  .cbt-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 99995 !important;
    background: var(--bg-surface-elevated, #ffffff) !important;
    border-top: 1.5px solid var(--border-color, #e2e8f0) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cbt-question-header {
    margin-bottom: 0.75rem !important;
  }

  .cbt-question-text {
    font-size: 0.95rem !important;
    margin-bottom: 1.25rem !important;
  }

  .cbt-option-item {
    padding: 0.75rem 0.85rem !important;
    margin-bottom: 0.6rem !important;
  }
}

/* ==============================================================================
   CBT FULLSCREEN IMMERSION & KIOSK LOCKDOWN CONTAINER (CROSS-DEVICE)
   ============================================================================== */
body.cbt-fullscreen-active {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: 100vw !important;
  position: fixed !important;
  inset: 0 !important;
}

body.cbt-fullscreen-active .app-header,
body.cbt-fullscreen-active .app-sidebar,
body.cbt-fullscreen-active .app-footer,
body.cbt-fullscreen-active .sidebar,
body.cbt-fullscreen-active .landing-nav,
body.cbt-fullscreen-active .mobile-bottom-bar,
body.cbt-fullscreen-active .sch-visitor-widget-card {
  display: none !important;
}

body.cbt-fullscreen-active .cbt-exam-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 99990 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.cbt-fullscreen-active .cbt-body-layout {
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  position: relative !important;
  overflow: hidden !important;
}

body.cbt-fullscreen-active .cbt-question-pane {
  flex: 1 !important;
  height: 100% !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 1.25rem 1.5rem 8.5rem !important;
}

@media (max-width: 768px) {
  body.cbt-fullscreen-active .cbt-question-pane {
    padding: 0.85rem 0.85rem 8.5rem !important;
  }
}

/* Pastikan Modal Konfirmasi & Notifikasi Toast Selalu Tampil di Atas Kontainer CBT */
body.cbt-fullscreen-active .modal-overlay {
  z-index: 10000005 !important;
}

body.cbt-fullscreen-active .modal-overlay.active {
  pointer-events: auto !important;
}

body.cbt-fullscreen-active .modal-overlay:not(.active) {
  pointer-events: none !important;
}

body.cbt-fullscreen-active .modal-window {
  z-index: 10000006 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

body.cbt-fullscreen-active .toast-container {
  z-index: 10000010 !important;
}

/* Tombol Keluar Ujian di Header & Mobile Bottom Bar */
.cbt-btn-quick-exit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ffffff;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cbt-btn-quick-exit:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.cbt-btn-nav-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cbt-btn-nav-exit:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #7f1d1d;
}

/* ==============================================================================
   CBT MOBILE TOUCH & SUBMISSION BUTTON INTERACTIVITY (iOS & Android Hardening)
   ============================================================================== */
.cbt-btn-quick-finish,
.cbt-btn-nav-finish,
.cbt-btn-finish,
.cbt-btn-open-grid,
.cbt-btn-quick-grid,
.cbt-btn-quick-exit,
.cbt-btn-nav-exit,
#btnConfirmFinishCbt {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Pastikan Modal Konfirmasi CBT Selalu Berada di Atas Semua Layer (z-index: 10000005) */
.modal-overlay.active {
  z-index: 10000005 !important;
  pointer-events: auto !important;
  display: flex !important;
}

.modal-overlay.active .modal-window {
  z-index: 10000006 !important;
  pointer-events: auto !important;
}

/* Safe Area Inset untuk Bottom Navigation Bar pada iPhone (Home Bar) */
@supports (padding: max(0px)) {
  .cbt-bottom-nav {
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom, 0.6rem)) !important;
  }
}



