/**
 * Course threads tab - modern card layout (light background, white cards, blue active tab)
 * Scoped under .course-threads-modern
 */
.course-threads-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  /* background: #f8f9fa; */
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

/* ----- Main container (white card) ----- */
.course-threads-modern .course-threads-modern__container {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ----- Top nav / filter bar ----- */
.course-threads-modern .nav-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
  margin: 0;
}

.course-threads-modern .nav-filter .nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  border: none;
  order: 1;
  flex: 0 0 auto;
}

.course-threads-modern .nav-filter .btn-group {
  order: 2;
  margin-left: auto;
}

.course-threads-modern .nav-filter .nav-pills li {
  margin: 0;
  float: none;
}

.course-threads-modern .nav-filter .nav-pills li a {
  padding: 8px 16px;
  border-radius: 6px;
  color: #6c757d;
  font-size: 14px;
  background: transparent;
  border: none;
}

.course-threads-modern .nav-filter .nav-pills li.active a,
.course-threads-modern .nav-filter .nav-pills li a:hover {
  color: #fff;
  background: #337ab7;
}

.course-threads-modern .nav-filter .btn-group .btn-default {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  color: #6c757d;
  border-radius: 6px;
  font-size: 14px;
}

.course-threads-modern .nav-filter .btn-group .dropdown-toggle .caret {
  margin-left: 6px;
}

/* Sort dropdown as pill-style button */
.course-threads-modern .nav-filter .nav-pills li.dropdown a {
  padding: 8px 14px;
  background: #e9ecef;
  border: 1px solid #dee2e6;
  color: #6c757d;
}

.course-threads-modern .nav-filter .nav-pills li.dropdown.open a {
  color: #343a40;
}

.course-threads-modern .nav-filter .nav-pills .dropdown-menu {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  margin-top: 4px;
}

.course-threads-modern .nav-filter .nav-pills .dropdown-menu li a {
  padding: 8px 16px;
  color: #343a40;
  background: transparent;
  border: none;
}

.course-threads-modern .nav-filter .nav-pills .dropdown-menu li a:hover {
  color: #337ab7;
}

.course-threads-modern .nav-filter .nav-pills .dropdown-menu li.active a {
  background: #dee2e6;
  color: #337ab7;
}

/* ----- Topic list wrapper ----- */
.course-threads-modern .topic-list {
  padding: 12px 20px 20px;
  background: #fff;
}

/* ----- Thread card (topic-item) ----- */
.course-threads-modern .topic-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.course-threads-modern .topic-item:last-child {
  margin-bottom: 0;
}

/* Avatar ----- */
.course-threads-modern .topic-item .media-left {
  padding-right: 0;
  flex-shrink: 0;
}

.course-threads-modern .topic-item .avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.course-threads-modern .topic-item .media-body {
  flex: 1;
  min-width: 0;
}

/* Title ----- */
.course-threads-modern .topic-item .title {
  margin-bottom: 8px;
}

.course-threads-modern .topic-item .title a {
  font-weight: 700;
  font-size: 15px;
  color: #343a40;
}

.course-threads-modern .topic-item .title a:hover {
  color: #337ab7;
}

.course-threads-modern .topic-item .title .es-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* Badges (sticky, essence, etc.) ----- */
.course-threads-modern .topic-item .title .label {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  margin-left: 8px;
  vertical-align: middle;
}

.course-threads-modern .topic-item .title .label-primary {
  background: #337ab7;
  color: #fff;
}

.course-threads-modern .topic-item .title .label-danger {
  background: #e0e0e0;
  color: #6c757d;
}

.course-threads-modern .topic-item .title .label-info {
  background: #f0f2f5;
  color: #6c757d;
}

/* Metas (author, last reply, time) ----- */
.course-threads-modern .topic-item .metas {
  font-size: 13px;
  color: #adb5bd;
}

.course-threads-modern .topic-item .metas a {
  color: #6c757d;
}

.course-threads-modern .topic-item .metas a:hover {
  color: #337ab7;
}

/* Reply / View stats (right) ----- */
.course-threads-modern .topic-item .media-data {
  flex-shrink: 0;
  text-align: right;
  padding-left: 16px;
}

.course-threads-modern .topic-item .media-data .thread-stat {
  display: block;
  margin-bottom: 4px;
}

.course-threads-modern .topic-item .media-data .thread-stat:last-child {
  margin-bottom: 0;
}

.course-threads-modern .topic-item .media-data .thread-stat-num {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #343a40;
  line-height: 1.3;
}

.course-threads-modern .topic-item .media-data .thread-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #adb5bd;
}

/* Show media-data on all screens in this style */
.course-threads-modern .topic-item .media-data.hidden-xs {
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
}

/* Empty state ----- */
.course-threads-modern .topic-list .empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

/* Pagination ----- */
.course-threads-modern nav.text-center {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.course-threads-modern .pagination > li > a,
.course-threads-modern .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 4px;
}

.course-threads-modern .pagination > .active > a,
.course-threads-modern .pagination > .active > span {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

/* ========== Course Notes tab (same style as Discussions) ========== */
.course-notes-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

.course-notes-modern .course-notes-modern__container {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.course-notes-modern .nav-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
  margin: 0;
}

.course-notes-modern .nav-filter .nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  border: none;
  order: 1;
  flex: 0 0 auto;
}

.course-notes-modern .nav-filter .btn-group {
  order: 2;
  margin-left: auto;
}

.course-notes-modern .nav-filter .nav-pills li {
  margin: 0;
  float: none;
}

.course-notes-modern .nav-filter .nav-pills li.dropdown a {
  padding: 8px 14px;
  background: #e9ecef;
  border: 1px solid #dee2e6;
  color: #6c757d;
  border-radius: 6px;
  font-size: 14px;
}

.course-notes-modern .nav-filter .nav-pills li.dropdown.open a {
  color: #343a40;
}

.course-notes-modern .nav-filter .nav-pills .dropdown-menu {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  margin-top: 4px;
}

.course-notes-modern .nav-filter .nav-pills .dropdown-menu li a {
  padding: 8px 16px;
  color: #343a40;
  background: transparent;
  border: none;
}

.course-notes-modern .nav-filter .nav-pills .dropdown-menu li a:hover {
  color: #337ab7;
}

.course-notes-modern .nav-filter .nav-pills .dropdown-menu li.active a {
  background: #dee2e6;
  color: #337ab7;
}

.course-notes-modern .nav-filter .btn-group .btn-default {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  color: #6c757d;
  border-radius: 6px;
  font-size: 14px;
}

.course-notes-modern .nav-filter .btn-group .dropdown-toggle .caret {
  margin-left: 6px;
}

.course-notes-modern .note-list {
  padding: 12px 20px 20px;
  background: #fff;
}

.course-notes-modern .note-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.course-notes-modern .note-item:last-child {
  margin-bottom: 0;
}

.course-notes-modern .note-item .media-left {
  padding-right: 0;
  flex-shrink: 0;
}

.course-notes-modern .note-item .avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.course-notes-modern .note-item .media-body {
  flex: 1;
  min-width: 0;
}

.course-notes-modern .note-item .content .editor-text {
  font-size: 14px;
  color: #343a40;
  line-height: 1.5;
}

.course-notes-modern .note-item .metas {
  font-size: 13px;
  color: #adb5bd;
  margin-top: 8px;
}

.course-notes-modern .note-item .metas a {
  color: #6c757d;
}

.course-notes-modern .note-item .metas a:hover {
  color: #337ab7;
}

.course-notes-modern .note-item .metas .icon-favour a {
  color: #6c757d;
}

.course-notes-modern .note-item .metas .icon-favour a.color-primary {
  color: #337ab7;
}

.course-notes-modern .note-list .empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.course-notes-modern .pagination {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.course-notes-modern .pagination > li > a,
.course-notes-modern .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 4px;
}

.course-notes-modern .pagination > .active > a,
.course-notes-modern .pagination > .active > span {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

/* ========== Course Material tab (same style as Discussions / Notes) ========== */
.course-material-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

.course-material-modern .course-material-modern__container {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.course-material-modern .material-list {
  padding: 20px;
  background: #fff;
}

.course-material-modern .material-item {
  display: block;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.course-material-modern .material-item:last-child {
  margin-bottom: 0;
}

.course-material-modern .material-item .media-body {
  padding: 0;
}

.course-material-modern .material-item__title {
  font-size: 15px;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 6px;
}

.course-material-modern .material-item__title a {
  color: #343a40;
}

.course-material-modern .material-item__title a:hover {
  color: #337ab7;
}

.course-material-modern .material-item__desc {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 8px;
  line-height: 1.45;
}

.course-material-modern .material-item__metas {
  font-size: 13px;
  color: #adb5bd;
}

.course-material-modern .material-item__metas .color-gray {
  color: #adb5bd;
}

.course-material-modern .material-item__metas .link-primary {
  color: #337ab7;
}

.course-material-modern .material-item__metas .bullet {
  margin: 0 6px;
  color: #dee2e6;
}

.course-material-modern .material-list .empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.course-material-modern .material-pagination {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.course-material-modern .material-pagination .pagination {
  margin: 0;
}

.course-material-modern .material-pagination .pagination > li > a,
.course-material-modern .material-pagination .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 4px;
}

.course-material-modern .material-pagination .pagination > .active > a,
.course-material-modern .material-pagination .pagination > .active > span {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

/* ========== Course Reviews tab (same style as Discussions / Notes / Material) ========== */
.course-reviews-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

.course-reviews-modern .course-reviews-modern__container {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.course-reviews-modern .reviews-content {
  padding: 20px;
  background: #fff;
}

.course-reviews-modern .reviews-content > .clearfix:first-child {
  margin-bottom: 16px;
}

.course-reviews-modern .reviews-content .btn-primary.btn-sm {
  background: #337ab7;
  border-color: #337ab7;
  border-radius: 6px;
  font-size: 14px;
}

.course-reviews-modern .js-reviews {
  margin-bottom: 12px;
}

.course-reviews-modern .js-reviews:last-of-type {
  margin-bottom: 0;
}

.course-reviews-modern .media-evaluate {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.course-reviews-modern .media-evaluate .media-left {
  padding-right: 0;
  flex-shrink: 0;
}

.course-reviews-modern .media-evaluate .media-left img,
.course-reviews-modern .media-evaluate .media-left .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.course-reviews-modern .media-evaluate .media-body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.course-reviews-modern .media-evaluate .title {
  font-size: 14px;
  color: #343a40;
  margin-bottom: 6px;
}

.course-reviews-modern .media-evaluate .title a {
  color: #343a40;
  font-weight: 600;
}

.course-reviews-modern .media-evaluate .title a:hover {
  color: #337ab7;
}

.course-reviews-modern .media-evaluate .title span {
  color: #adb5bd;
  font-weight: 400;
  font-size: 13px;
}

.course-reviews-modern .media-evaluate .score {
  margin-bottom: 8px;
}

.course-reviews-modern .media-evaluate .content {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

.course-reviews-modern .media-evaluate .content .short-content,
.course-reviews-modern .media-evaluate .content .full-content {
  color: #343a40;
}

.course-reviews-modern .media-evaluate .content .label-success {
  background: #e0e0e0;
  color: #6c757d;
  font-size: 11px;
  border-radius: 4px;
}

.course-reviews-modern .media-evaluate .actions {
  margin-top: 8px;
  font-size: 13px;
}

.course-reviews-modern .media-evaluate .actions a {
  color: #337ab7;
}

.course-reviews-modern .media-evaluate .thread-subpost-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.course-reviews-modern .reviews-content > .empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.course-reviews-modern .reviews-content .pagination {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.course-reviews-modern .reviews-content .pagination > li > a,
.course-reviews-modern .reviews-content .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 4px;
}

.course-reviews-modern .reviews-content .pagination > .active > a,
.course-reviews-modern .reviews-content .pagination > .active > span {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

/* ========== Course thread show page (/course/{id}/thread/{threadId}) ========== */
.course-thread-show-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

.course-thread-show-modern .course-thread-show-modern__container {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  padding: 20px;
}

.course-thread-show-modern .breadcrumb {
  background: transparent;
  padding: 0 0 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid #e9ecef;
  border-radius: 0;
}

.course-thread-show-modern .breadcrumb li a {
  color: #337ab7;
}

.course-thread-show-modern .breadcrumb li.active {
  color: #6c757d;
  font-size: 14px;
}

.course-thread-show-modern .thread {
  margin-bottom: 24px;
}

.course-thread-show-modern .thread-header {
  position: relative;
  padding-right: 56px;
  margin-bottom: 12px;
}

.course-thread-show-modern .thread-header .pull-right img,
.course-thread-show-modern .thread-header .pull-right .avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.course-thread-show-modern .thread-header .pull-right {
  position: absolute;
  top: 0;
  right: 0;
}

.course-thread-show-modern .thread-title {
  font-size: 20px;
  font-weight: 700;
  color: #343a40;
  margin: 0 0 8px;
  line-height: 1.35;
}

.course-thread-show-modern .thread-title .label-info {
  background: #e0e0e0;
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  margin-right: 8px;
}

.course-thread-show-modern .thread-metas {
  font-size: 13px;
  color: #adb5bd;
}

.course-thread-show-modern .thread-metas .link-primary {
  color: #337ab7;
}

.course-thread-show-modern .thread-metas .bullet {
  color: #dee2e6;
  margin: 0 6px;
}

.course-thread-show-modern .thread-body {
  font-size: 14px;
  color: #343a40;
  line-height: 1.6;
  padding: 16px 0;
  border-bottom: 1px solid #e9ecef;
}

.course-thread-show-modern .thread-footer {
  padding-top: 12px;
}

.course-thread-show-modern .thread-footer .btn-link {
  color: #6c757d;
  font-size: 13px;
}

.course-thread-show-modern .thread-footer .btn-link:hover {
  color: #337ab7;
}

.course-thread-show-modern .thread-posts {
  padding-top: 8px;
}

.course-thread-show-modern .thread-posts-heading {
  font-size: 15px;
  font-weight: 600;
  color: #343a40;
  margin: 20px 0 12px;
  padding-bottom: 8px;
}

.course-thread-show-modern .thread-posts-heading:first-child {
  margin-top: 0;
}

.course-thread-show-modern .thread-post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.course-thread-show-modern .thread-post-list .thread-post {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.course-thread-show-modern .thread-post-list .thread-post:last-child {
  margin-bottom: 0;
}

.course-thread-show-modern .thread-post .pull-left.media-object,
.course-thread-show-modern .thread-post .pull-left img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.course-thread-show-modern .thread-post .thread-post-dropdown {
  order: 2;
  margin-left: auto;
  flex-shrink: 0;
}

.course-thread-show-modern .thread-post .thread-post-body {
  order: 1;
  flex: 1;
  min-width: 0;
  padding: 0;
}

.course-thread-show-modern .thread-post .media-heading {
  font-size: 14px;
  margin-bottom: 6px;
}

.course-thread-show-modern .thread-post .media-heading a {
  color: #343a40;
  font-weight: 600;
}

.course-thread-show-modern .thread-post .media-heading .color-gray {
  color: #adb5bd;
  font-size: 13px;
}

.course-thread-show-modern .thread-post .editor-text {
  font-size: 14px;
  color: #343a40;
  line-height: 1.5;
}

.course-thread-show-modern .thread-post .thread-post-action a {
  color: #337ab7;
  font-size: 13px;
}

.course-thread-show-modern .thread-post-list .empty {
  padding: 24px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
  list-style: none;
}

.course-thread-show-modern .pagination {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.course-thread-show-modern .pagination > li > a,
.course-thread-show-modern .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 4px;
}

.course-thread-show-modern .pagination > .active > a,
.course-thread-show-modern .pagination > .active > span {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

/* ========== My Discussions (/my/discussions) – modern card style ========== */
.my-discussions-panel .panel-body {
  padding: 0;
  background: transparent;
}

.my-discussions-modern {
  font-family: 'Noto Sans', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  /* background: #f8f8f8; */
  margin: 0 -15px;
  padding: 20px 15px 24px;
  border-radius: 6px;
}

.my-discussions-modern__container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ----- Tabs (Course Discussion / Class Discussion) ----- */
.my-discussions-modern .nav.nav-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  padding: 16px 20px 0;
  border: none;
  background: #fff;
}

.my-discussions-modern .nav.nav-pills li {
  margin: 0;
  float: none;
}

.my-discussions-modern .nav.nav-pills li a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: #f0f0f0;
  border: none;
  text-decoration: none;
}

.my-discussions-modern .nav.nav-pills li a:hover {
  color: #333;
  background: #e8e8e8;
}

.my-discussions-modern .nav.nav-pills li.active a {
  color: #fff;
  background: #4caf50;
}

.my-discussions-modern .nav.nav-pills li.active a:hover {
  color: #fff;
  background: #43a047;
}

.my-discussions-modern__container .nav.nav-pills + br {
  display: none;
}

.my-discussions-modern__list {
  padding: 16px 20px 20px;
  background: #fff;
}

.my-discussions-modern__list .media-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ----- Discussion cards ----- */
.my-discussions-modern__list .media-list > .media {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 16px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
}

.my-discussions-modern__list .media-list > .media:last-child {
  margin-bottom: 0;
}

/* Avatar placeholder (circle) when no media-left */
.my-discussions-modern__list .media-list > .media::before {
  content: '';
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e3f2fd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2390caf9'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
  background-size: 26px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hide placeholder when theme provides .media-left avatar or .media-object (e.g. notebooks course cover) */
.my-discussions-modern__list .media-list > .media:has(.media-left)::before,
.my-discussions-modern__list .media-list > .media:has(.media-object)::before {
  display: none;
}

.my-discussions-modern__list .media-list > .media .media-left {
  flex-shrink: 0;
  padding-right: 0;
}

.my-discussions-modern__list .media-list > .media .media-left img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.my-discussions-modern__list .media-list > .media .media-body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

/* Reply count badge (top right of card) */
.my-discussions-modern__list .media-list > .media .badge.pull-right {
  position: absolute;
  top: 16px;
  right: 20px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: #e0e0e0;
  color: #555;
}

/* Title row */
.my-discussions-modern__list .media-list > .media .mbm {
  margin-bottom: 10px;
  padding-right: 50px;
}

.my-discussions-modern__list .media-list > .media .mbm a {
  font-weight: 700;
  font-size: 15px;
  color: #333;
}

.my-discussions-modern__list .media-list > .media .mbm a:hover {
  color: #4caf50;
}

/* Labels (question, L123, essence) */
.my-discussions-modern__list .media-list > .media .mbm .label {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}

.my-discussions-modern__list .media-list > .media .mbm .label-info {
  background: #add8e6;
  color: #fff;
}

.my-discussions-modern__list .media-list > .media .mbm .label-default,
.my-discussions-modern__list .media-list > .media .mbm .label {
  background: #e3f2fd;
  color: #1976d2;
}

.my-discussions-modern__list .media-list > .media .mbm .label-warning {
  background: #fff3e0;
  color: #e65100;
}

/* Metadata line (course, last reply, views) */
.my-discussions-modern__list .media-list > .media .color-gray {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.my-discussions-modern__list .media-list > .media .color-gray a {
  color: #555;
}

.my-discussions-modern__list .media-list > .media .color-gray a:hover {
  color: #4caf50;
}

.my-discussions-modern__list .media-list > .media .color-gray .bullet {
  margin: 0 6px;
  color: #bbb;
}

/* Empty state */
.my-discussions-modern__list .empty {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

/* Pagination */
.my-discussions-modern__list nav.text-center {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.my-discussions-modern__list .pagination > li > a,
.my-discussions-modern__list .pagination > li > span {
  color: #6c757d;
  border-color: #dee2e6;
  border-radius: 6px;
}

.my-discussions-modern__list .pagination > .active > a,
.my-discussions-modern__list .pagination > .active > span {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
}

/* ----- My Notebooks list (same card style, course cover as image) ----- */
.my-discussions-modern__list .notebook-list .media-object {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 0;
}

.my-discussions-modern__list .notebook-list .media-heading {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.my-discussions-modern__list .notebook-list .notebook-metas {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.my-discussions-modern__list .notebook-list .notebook-metas:last-of-type {
  margin-bottom: 0;
}

.my-discussions-modern__list .notebook-list .notebook-time {
  margin-right: 8px;
}

.my-discussions-modern__list .notebook-list .notebook-go {
  font-size: 13px;
  font-weight: 500;
  color: #4caf50;
}

.my-discussions-modern__list .notebook-list .notebook-go:hover {
  color: #43a047;
}

/* ----- My Homework list (finished/reviewing) – table in card style ----- */
.my-discussions-modern__list .my-homework-table {
  margin: 0;
  border: none;
}

.my-discussions-modern__list .my-homework-table tbody tr {
  border-bottom: 1px solid #e8e8e8;
  transition: background-color 0.15s ease;
}

.my-discussions-modern__list .my-homework-table tbody tr:last-child {
  border-bottom: none;
}

.my-discussions-modern__list .my-homework-table tbody tr:hover {
  background-color: #f8f9fa;
}

.my-discussions-modern__list .my-homework-table td {
  padding: 14px 0;
  vertical-align: middle !important;
  border: none;
}

.my-discussions-modern__list .my-homework-table__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.my-discussions-modern__list .my-homework-table__meta {
  font-size: 13px;
}

.my-discussions-modern__list .my-homework-table__meta .color-gray,
.my-discussions-modern__list .my-homework-table__meta small {
  color: #888;
}

.my-discussions-modern__list .my-homework-table__meta .link-primary {
  color: #4caf50;
}

.my-discussions-modern__list .my-homework-table__meta .link-primary:hover {
  color: #43a047;
}

.my-discussions-modern__list .my-homework-table__link {
  font-size: 14px;
  font-weight: 500;
  color: #4caf50;
}

.my-discussions-modern__list .my-homework-table__link:hover {
  color: #43a047;
}

/* Testpaper check list: style links in table cells like homework table */
.my-discussions-modern__list .my-homework-table td .link-primary {
  color: #4caf50;
}

.my-discussions-modern__list .my-homework-table td .link-primary:hover {
  color: #43a047;
}

/* ----- My Orders – layout uses my-discussions-modern without panel ----- */
.my-discussions-modern__list .my-orders-search {
  margin-bottom: 16px;
}

.my-discussions-modern__list .my-orders-search .form-control-sm {
  border-radius: 6px;
  border-color: #dee2e6;
}

.my-discussions-modern__list .my-orders-search .btn-primary {
  background: #4caf50;
  border-color: #4caf50;
  border-radius: 6px;
}

.my-discussions-modern__list .my-orders-search .btn-primary:hover {
  background: #43a047;
  border-color: #43a047;
}

.my-discussions-modern__list #orders-table .cd-link-major,
.my-discussions-modern__list #orders-table .cd-link-primary {
  color: #4caf50;
}

.my-discussions-modern__list #orders-table .cd-link-major:hover,
.my-discussions-modern__list #orders-table .cd-link-primary:hover {
  color: #43a047;
}

/* ----- My Classrooms list – card style ----- */
.my-discussions-modern__list .my-classroom-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-discussions-modern__list .my-classroom-list .course-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 16px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.my-discussions-modern__list .my-classroom-list .course-item:last-child {
  margin-bottom: 0;
}

.my-discussions-modern__list .my-classroom-list .course-picture-link {
  flex-shrink: 0;
}

.my-discussions-modern__list .my-classroom-list .course-picture {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.my-discussions-modern__list .my-classroom-list .course-body {
  flex: 1;
  min-width: 0;
}

.my-discussions-modern__list .my-classroom-list .course-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.my-discussions-modern__list .my-classroom-list .course-body h4 a {
  color: #333;
}

.my-discussions-modern__list .my-classroom-list .course-body h4 a:hover {
  color: #4caf50;
}

.my-discussions-modern__list .my-classroom-list .course-body .color-gray {
  color: #888;
  font-size: 13px;
}

.my-discussions-modern__list .my-classroom-list .course-body .btn-info.btn-sm {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
  border-radius: 6px;
}

.my-discussions-modern__list .my-classroom-list .course-body .btn-info.btn-sm:hover {
  background: #43a047;
  border-color: #43a047;
  color: #fff;
}

.my-discussions-modern__list .my-classroom-list .course-body .progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 3px;
  background: #e8e8e8;
}

.my-discussions-modern__list .my-classroom-list .course-body .progress-bar {
  background: #4caf50;
  border-radius: 3px;
}

/* Teaching classroom: manage link + course footer (today data) */
.my-discussions-modern__list .my-classroom-list .course-body__manage {
  float: right;
  margin: 0 0 8px 8px;
  font-size: 13px;
}

.my-discussions-modern__list .my-classroom-list .course-body__manage a {
  color: #4caf50;
}

.my-discussions-modern__list .my-classroom-list .course-body__manage a:hover {
  color: #43a047;
}

.my-discussions-modern__list .my-classroom-list .course-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #555;
}

.my-discussions-modern__list .my-classroom-list .course-footer strong {
  color: #333;
}

/* ----- My Group center – section headers ----- */
.my-discussions-modern__list.my-group-center-list .page-header {
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e8e8;
}

.my-discussions-modern__list.my-group-center-list .page-header:first-child {
  margin-top: 0;
}

.my-discussions-modern__list.my-group-center-list .page-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.my-discussions-modern__list.my-group-center-list .page-header .badge-primary {
  background: #4caf50;
  border-radius: 12px;
  font-weight: 500;
}

/* ----- My Notebook show (/my/notebook/{courseId}) – same style as notebooks index ----- */
.notebook-show-list .notebook {
  margin: 0;
}

.notebook-show-list .notebook-show-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border: none;
}

.notebook-show-list .notebook-back-btn {
  order: 1;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #4caf50;
  background: transparent;
  border: 1px solid #4caf50;
  border-radius: 6px;
  text-decoration: none;
}

.notebook-show-list .notebook-back-btn:hover {
  color: #fff;
  background: #4caf50;
}

.notebook-show-list .notebook-show-course {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 2;
  flex: 1;
  min-width: 0;
}

.notebook-show-list .notebook-show-course__img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.notebook-show-list .notebook-show-course__title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.notebook-show-list .notebook-body {
  margin: 0;
  padding: 0;
  border: none;
}

.notebook-show-list .notebook-note {
  padding: 18px 20px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.notebook-show-list .notebook-note:last-child {
  margin-bottom: 0;
}

.notebook-show-list .notebook-note:hover {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.notebook-show-list .notebook-note-heading {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #333;
}

.notebook-show-list .notebook-note-heading a {
  color: #333;
}

.notebook-show-list .notebook-note-heading a:hover {
  color: #4caf50;
}

.notebook-show-list .notebook-note-length {
  font-weight: 400;
  font-size: 13px;
  color: #888;
}

.notebook-show-list .notebook-note-summary {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 0;
}

.notebook-show-list .notebook-note-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8e8e8;
}

.notebook-show-list .notebook-note-body__content {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

.notebook-show-list .notebook-note-collapse-bar {
  margin: 12px 0 0 0;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  text-align: center;
  color: #888;
  cursor: pointer;
  font-size: 12px;
}

.notebook-show-list .notebook-note-collapse-bar:hover {
  background: #eee;
  color: #555;
}

.notebook-show-list .notebook-note-actions {
  margin: 12px 0 0 0;
}

.notebook-show-list .notebook-note-delete {
  color: #888;
  font-size: 14px;
}

.notebook-show-list .notebook-note-delete:hover {
  color: #d32f2f;
}
