body {
  background: radial-gradient(circle at 2% 2%, #eef4ff 0%, #f6f8fb 45%, #f7f9fc 100%);
  color: #1f2a37;
}
.navbar-brand { font-weight: 700; letter-spacing: .4px; }
.app-topbar { box-shadow: 0 6px 20px rgba(16, 24, 40, 0.18); }
.card {
  border-radius: 14px;
  border: 1px solid #e8edf5;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}
.app-sidebar .list-group-item {
  border: 0;
  border-left: 3px solid transparent;
  transition: all .18s ease;
}
.app-sidebar .list-group-item:hover {
  background: #f2f7ff;
  border-left-color: #9bc2ff;
}
.app-sidebar .list-group-item.active {
  background: #e9f1ff;
  color: #0a58ca;
  border-left-color: #0a58ca;
  font-weight: 600;
}
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .16);
}
.btn { border-radius: 10px; }
.table thead th {
  font-size: .82rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.table-hover tbody tr:hover { background: #f7fbff; }
.badge-status { font-size: .8rem; }
.q-palette button { width: 38px; height: 38px; margin: 4px; }
.q-palette .qbtn { border: 2px solid transparent; font-weight: 700; }
.q-palette .btn-answered { background: #198754; color: #fff; }
.q-palette .btn-unanswered { background: #dc3545; color: #fff; }
.q-palette .btn-review { background: #ffc107; color: #111; }
.q-palette .btn-current { border-color: #0d6efd !important; box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15); }
.timer-pill { font-variant-numeric: tabular-nums; }

/* Last 60s: timer turns red */
.timer-last60 { color: #dc3545; font-weight: 800; }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .25; }
}
/* Slower blink for LIVE status */
.blink-live { animation: blink 2.4s infinite; }


/* Exam panel responsive tweaks */
@media (max-width: 991.98px) {
  .q-palette button { width: 34px; height: 34px; margin: 3px; }
  .question-card .fw-semibold { font-size: 0.98rem; }
}
@media (max-width: 575.98px) {
  .q-palette { display: flex; flex-wrap: wrap; }
  .q-palette button { width: 32px; height: 32px; margin: 2px; font-size: 0.85rem; }
  .card-body { padding: 12px; }
}

.q-palette button {
  min-width: 38px;        /* ensures enough width for 2 digits */
  height: 38px;
  padding: 0;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;    /* prevents digit breaking */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Exam Panel Premium Styling */
.option-wrapper {
  border: 2px solid #e8edf5 !important;
  background: #ffffff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.option-wrapper:hover {
  background: #f8faff !important;
  border-color: #cce0ff !important;
  transform: translateY(-1px);
}
.option-wrapper:has(input:checked) {
  background: #edf5ff !important;
  border-color: #0d6efd !important;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.12);
}

/* Custom sleek scrollbar for palette and review list */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Question Palette Button Enhancements */
.q-palette button {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.q-palette .btn-answered { background: #198754; color: #fff; box-shadow: 0 2px 6px rgba(25,135,84,0.2); }
.q-palette .btn-unanswered { background: #dc3545; color: #fff; box-shadow: 0 2px 6px rgba(220,53,69,0.2); }
.q-palette .btn-review { background: #ffc107; color: #000; box-shadow: 0 2px 6px rgba(255,193,7,0.2); }
.q-palette .btn-current { 
  border: 2px solid #0d6efd !important; 
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(13,110,253,0.25) !important; 
}

