body {
  background-color: var(--navy-bg);
  color: var(--text-main);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── WRAPPER ── */
.exam-wrapper {
  padding: calc(var(--nav-height) + 20px) 16px 60px;
}

/* ── BREADCRUMB ── */
.breadcrumb-exam {
  background: var(--navy-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 1.5rem;
}
.breadcrumb-exam .breadcrumb {
  margin-bottom: 0;
}
.breadcrumb-exam .breadcrumb-item a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.breadcrumb-exam .breadcrumb-item a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}
.breadcrumb-exam .breadcrumb-item.active {
  color: var(--text-muted);
  font-weight: 500;
}

/* ── FILTER CARD ── */
.filter-card {
  background: var(--navy-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.filter-card .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.filter-card .form-select,
.filter-card .form-control {
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--navy-input);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-card .form-select:focus,
.filter-card .form-control:focus {
  border-color: var(--gold);
  background-color: var(--navy-card);
  box-shadow: 0 0 0 3px var(--border-color-focus);
}

.filter-card .form-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--navy-input);
}

.filter-card .row.g-3 {
  --bs-gutter-y: 1rem;
}

/* ── BUTTONS ── */
.btn-gold {
  background-color: var(--gold);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: var(--transition);
}
.btn-gold:hover {
  background-color: var(--gold-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn-gold-outline {
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  background: var(--navy-input);
  border-radius: 10px;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-gold-outline:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* ── EXAM MAIN CARD ── */
.exam-main-card {
  background: var(--navy-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}

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

.exam-main-card .header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exam-main-card .header-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--navy-input);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}
.exam-main-card .header-count strong {
  color: var(--gold);
}

/* ── EXAM ITEM (FIXED) ── */
.exam-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  text-decoration: none;
  transition: var(--transition);
  color: var(--text-main);
}

/* Hover: đổi viền vàng + thêm dải vàng bên trái (không làm lệch layout) */
.exam-item:hover {
  border-color: var(--gold);
  box-shadow: inset 4px 0 0 0 var(--gold), var(--shadow-main);
  transform: translateX(6px);
  color: var(--text-main);
}

/* Thumbnail PDF */
.exam-item .pdf-icon-wrapper {
  flex-shrink: 0;
  width: 52px;
  height: 64px;
  background: var(--navy-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #dc2626;
  overflow: hidden;
  transition: var(--transition);
}

.exam-item:hover .pdf-icon-wrapper {
  border-color: var(--gold);
  background: #fff7ed;
  transform: scale(1.04);
}

.pdf-preview-small {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nội dung giữa */
.exam-item .exam-content {
  flex: 1;
  min-width: 0;
}

.exam-item .exam-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  transition: color var(--transition);
  line-height: 1.4;
}

.exam-item:hover .exam-title {
  color: var(--gold);
}

.exam-item .exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* Chip / Badge tag */
.badge-tag {
  background: var(--navy-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

.badge-tag i {
  margin-right: 4px;
  color: var(--gold);
}

/* ── EXAM STATS (View & Download) ── */
.exam-item .exam-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.exam-item .stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--navy-input);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.exam-item .stat-badge i {
  color: var(--gold);
  font-size: 0.8rem;
}

.exam-item:hover .stat-badge {
  background: var(--navy-card);
  border-color: var(--gold);
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 3.5rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: block;
}
.empty-state h6 {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── PAGINATION ── */
.pagination-wrapper {
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
}

.pagination .page-link {
  border-radius: 8px;
  margin: 0 3px;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: var(--navy-card);
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.pagination .page-link:hover:not(.active) {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--navy-input);
}
.pagination .page-item.active .page-link {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  background: var(--navy-input);
  border-color: var(--border-color);
  pointer-events: none;
}

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 992px) {
  .exam-wrapper {
    padding: calc(var(--nav-height) + 16px) 12px 40px;
  }
  .filter-card,
  .exam-main-card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .exam-wrapper {
    padding: calc(var(--nav-height) + 12px) 10px 30px;
  }
  .filter-card,
  .exam-main-card {
    padding: 16px;
  }
  .exam-item {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
  }
  .exam-item .pdf-icon-wrapper {
    width: 44px;
    height: 54px;
    font-size: 1.5rem;
  }
  .exam-item .exam-content {
    flex: 1 1 calc(100% - 70px);
  }
  .exam-item .exam-stats {
    margin-left: auto;
  }
  .exam-main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .filter-card .row.g-3 {
    --bs-gutter-y: 0.75rem;
  }
}

@media (max-width: 576px) {
  .exam-wrapper {
    padding: calc(var(--nav-height) + 8px) 6px 20px;
  }
  .filter-card,
  .exam-main-card {
    padding: 12px;
    border-radius: 12px;
  }
  .exam-item .pdf-icon-wrapper {
    width: 38px;
    height: 48px;
    font-size: 1.2rem;
  }
  .exam-item .exam-title {
    font-size: 0.875rem;
  }
  .badge-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  .exam-item .exam-stats {
    flex-wrap: wrap;
    gap: 4px;
  }
  .exam-item .stat-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
  }
}

@media (max-width: 400px) {
  .exam-item .pdf-icon-wrapper {
    width: 32px;
    height: 42px;
    font-size: 1rem;
  }
  .exam-item .exam-meta {
    gap: 4px;
  }
  .badge-tag {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}