/* ============================================
   Admin Sidebar Layout
   ============================================ */
.admin-wrapper {
  display: flex;
  min-height: calc(100vh - 63px); /* navbar 60px + border 3px */
}

/* === Sidebar === */
#adminSidebar {
  width: 250px;
  min-width: 250px;
  background: var(--tu-navy);
  color: rgba(255,255,255,0.7);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
}
.sidebar-brand {
  padding: 1.25rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-nav {
  padding: 0.75rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  margin: 1px 0.5rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.sidebar-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.sidebar-link.active {
  color: #fff;
  background: var(--tu-red);
}
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 1.25rem;
  flex-shrink: 0;
}
.sidebar-back {
  margin-top: auto;
}
.sidebar-back:hover {
  color: var(--tu-yellow);
}

/* === Admin Content Area === */
.admin-content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  background: var(--background);
  min-width: 0;
}

/* === Responsive Sidebar === */
@media (max-width: 991.98px) {
  .admin-wrapper {
    flex-direction: column;
  }
  #adminSidebar {
    width: 100%;
    min-width: 100%;
    flex-direction: column;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.25rem;
  }
  .sidebar-link {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
  .sidebar-divider { display: none; }
  .sidebar-back { margin-top: 0; }
  .admin-content {
    padding: 1rem;
  }
}

/* === Reviews Section === */
.review-stars {
  color: var(--tu-yellow);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.review-stars .text-muted {
  color: #ccc !important;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tu-red-lighter);
  color: var(--tu-red);
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--border);
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.review-summary .display-5 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1;
}

.review-summary .review-stars {
  font-size: 1.25rem;
}

/* Star rating input (for review form) */
.star-rating-input {
  display: flex;
  gap: 0.25rem;
}

.star-rating-input .star {
  font-size: 1.75rem;
  cursor: pointer;
  color: #ddd;
  transition: color 0.15s ease;
}

.star-rating-input .star.active,
.star-rating-input .star:hover {
  color: var(--tu-yellow);
}

/* Reviews responsive */
@media (max-width: 767.98px) {
  .review-card {
    padding: 1.25rem;
  }
  .review-avatar {
    width: 40px;
    height: 40px;
  }
}

/* === Image Crop Modal === */
.crop-container {
  max-height: 60vh;
  overflow: hidden;
  background: #1a1a1a;
  border-radius: var(--radius);
}

.crop-container img {
  max-width: 100%;
  display: block;
}

#cropModal .modal-body {
  padding: 1rem;
}

#cropModal .crop-info .badge {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
}

/* === Course Hero Section === */
.course-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--tu-navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}

.course-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 42, 73, 0.95) 0%,
    rgba(27, 42, 73, 0.75) 40%,
    rgba(27, 42, 73, 0.4) 100%
  );
}

/* Gradient-only hero (no background image) */
.course-hero-gradient {
  background-image: none !important;
  background: #1B2A49;
}

.course-hero-gradient .course-hero-overlay-solid {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.07) 40%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 100%
  );
}

.course-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem;
  width: 100%;
}


.course-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

.course-hero-breadcrumb a {
  color: var(--tu-yellow);
  text-decoration: none;
}

.course-hero-breadcrumb a:hover {
  text-decoration: underline;
}

.course-hero-breadcrumb span {
  color: rgba(255,255,255,0.6);
}

.course-hero-breadcrumb i,
.course-hero-breadcrumb [data-lucide] {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.4);
}

.course-hero-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.course-hero-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  max-width: 700px;
}

.course-hero-instructor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
}

.course-hero-instructor small {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

.course-hero-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tu-red);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.course-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.course-hero-stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
}

.course-hero-stat i,
.course-hero-stat [data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--tu-yellow);
}

@media (max-width: 767.98px) {
  .course-hero {
    min-height: 220px;
    border-radius: 0;
    margin: -1rem -0.75rem 0;
  }
  .course-hero-content {
    padding: 1.25rem 1rem;
  }
  .course-hero-title {
    font-size: 1.5rem;
  }
  .course-hero-stats {
    gap: 0.75rem;
  }
  .course-hero-stat {
    font-size: 0.75rem;
  }
}

/* === Media Manager === */
.media-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.media-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.media-card:hover .media-thumb img {
  transform: scale(1.05);
}

.media-thumb-error {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted-fg);
}

.media-filename {
  word-break: break-all;
}

.bg-primary-subtle {
  background-color: var(--tu-red-lighter) !important;
}

/* Review table avatar */
.rv-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.rv-avatar-ph {
  background: var(--tu-red);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 600;
}

