/* ============================================================
   UNIVERSAL BATCHES SYSTEM - STYLING
   ============================================================ */

/* CSS Variables Override & Custom styling */
:root {
  --batch-hero-gradient: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(162, 28, 175, 0.08) 100%);
  --card-glow-indigo: 0 0 20px rgba(99, 102, 241, 0.15);
  --card-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.15);
  --tab-height: 48px;
}

[data-theme="dark"] {
  --batch-hero-gradient: linear-gradient(135deg, rgba(94, 92, 230, 0.15) 0%, rgba(191, 90, 242, 0.15) 100%);
  --card-glow-indigo: 0 0 25px rgba(94, 92, 230, 0.25);
  --card-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
}

/* ==========================================
   PAGE LAYOUT & HERO
   ========================================== */
.batch-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  width: 100%;
}

.batch-hero {
  position: relative;
  background: var(--batch-hero-gradient);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  overflow: hidden;
}

.batch-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.batch-hero-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.batch-hero-orb.orb1 {
  top: -100px;
  left: -50px;
  background: var(--primary);
}

.batch-hero-orb.orb2 {
  bottom: -150px;
  right: -50px;
  background: var(--secondary);
}

.batch-hero-container {
  max-width: var(--max-w-xl);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.2);
  margin-bottom: 16px;
}

.batch-badge.elite {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.2);
}

.batch-badge.learner {
  background: rgba(162, 28, 175, 0.1);
  color: #a21caf;
  border-color: rgba(162, 28, 175, 0.2);
}

.batch-badge.free {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.2);
}

.batch-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}

.batch-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.batch-meta-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.batch-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

/* ==========================================
   STICKY BARS
   ========================================== */
.batch-navigation-bar {
  position: sticky;
  top: 70px;
  /* Under normal navbar */
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--border);
}

/* If parent navbar scrolls out or is different */
.navbar.scrolled+.batch-wrapper .batch-navigation-bar {
  top: 70px;
}

.tabs-container {
  max-width: var(--max-w-xl);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  gap: 8px;
  height: var(--tab-height);
  align-items: center;
}

.tabs-container::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome/Safari */
}

.tab-link {
  flex-shrink: 0;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-link:hover {
  color: var(--text);
  background: var(--primary-light);
}

.tab-link.active {
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

/* ==========================================
   SECTIONS CONTAINER
   ========================================== */
.batch-content-main {
  max-width: var(--max-w-xl);
  margin: 0 auto;
  padding: 30px var(--container-px) 80px;
  width: 100%;
}

.batch-section {
  display: none;
  animation: fadeInUp 0.4s var(--spring-easing, ease-out);
}

.batch-section.active {
  display: block;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

/* Desktop layout constraint for clean reading */
@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================
   LECTURES GRID & CARDS
   ========================================== */
.lecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  will-change: transform, box-shadow;
}

.lecture-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.lecture-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.lecture-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.lecture-card:hover .lecture-thumbnail {
  transform: scale(1.05);
}

.lecture-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lecture-card:hover .lecture-play-overlay {
  opacity: 1;
}

.play-btn-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb, 99, 102, 241), 0.4);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lecture-card:hover .play-btn-circle {
  transform: scale(1);
}

.lecture-badge-group {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.card-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card-badge.new {
  background: var(--accent);
}

.card-badge.completed {
  background: var(--success);
}

.card-badge.locked {
  background: var(--danger);
}

.lecture-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
}

.lecture-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lecture-number {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.lecture-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.lecture-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.lecture-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.watch-btn-primary {
  width: 100%;
  padding: 10px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  margin-top: 12px;
}

.watch-btn-primary:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

/* ==========================================
   DOCS & PDF CARDS
   ========================================== */
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 100%;
  transition: var(--transition);
}

.doc-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.doc-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.doc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.doc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.doc-btn {
  padding: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.doc-btn.open {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.doc-btn.open:hover {
  background: var(--primary);
  color: white;
}

.doc-btn.download {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.doc-btn.download:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .doc-btn.download:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   ANNOUNCEMENTS
   ========================================== */
.announce-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  grid-column: 1 / -1;
  transition: var(--transition);
  position: relative;
}

.announce-card:hover {
  border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.announce-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.announce-sender {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announce-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.announce-sender-info {
  display: flex;
  flex-direction: column;
}

.announce-sender-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.announce-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.announce-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================
   EMPTY & SKELETON STATES
   ========================================== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.skeleton-card {
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 300px;
}

.skeleton-pulse {
  position: relative;
  overflow: hidden;
}

.skeleton-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 1.5s infinite;
}

[data-theme="light"] .skeleton-pulse::after {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ==========================================
   YOUTUBE MODAL POPUP
   ========================================== */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.video-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-container {
  width: 90%;
  max-width: 960px;
  background: #090b11;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--card-glow-indigo);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal-overlay.active .video-modal-container {
  transform: scale(1);
}

.video-modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.video-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.video-modal-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-modal-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-error-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #090a10;
  color: #94a3b8;
  padding: 20px;
  text-align: center;
  z-index: 10;
}

.video-error-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ==========================================
   LOCK SCREEN DISPLAY
   ========================================== */
.batch-lock-screen {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  margin: 40px auto;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.4s var(--spring-easing, ease-out);
}

.lock-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 24px;
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.lock-title {
  font-family: var(--font-display, inherit);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.lock-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  font-weight: 500;
}

.lock-btn {
  background: var(--primary);
  border: none;
  padding: 14px 40px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  color: white;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb, 99, 102, 241), 0.35);
  transition: var(--transition);
}

.lock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(var(--primary-rgb, 99, 102, 241), 0.55);
}

/* ==========================================
   MOBILE RESPONSIVENESS & MOBILE-FIRST
   ========================================== */
@media (max-width: 768px) {
  .batch-hero {
    padding: 30px 0;
  }

  .batch-navigation-bar {
    top: 60px;
    /* Under mobile navbar */
  }

  .tabs-container {
    padding: 0 16px;
  }

  .batch-content-main {
    padding-top: 20px;
    padding-bottom: 60px;
  }

  /* Sticky video layout for mobile */
  .mobile-video-sticky {
    position: sticky;
    top: 60px;
    z-index: 200;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }

  .mobile-video-sticky+.batch-navigation-bar {
    top: calc(60px + 56.25vw);
    /* Height of 16:9 player top-docked */
  }

  /* Touches and controls spacing */
  .tab-link {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .watch-btn-primary {
    padding: 12px;
  }

  .doc-actions {
    grid-template-columns: 1fr;
  }

  .video-modal-container {
    width: 96%;
    border-radius: var(--radius-sm);
  }
}

/* ==========================================
   PROGRESS, SEARCH, FILTERS & BOOKMARKS
   ========================================== */
.batch-controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.progress-tracker-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #34d399);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.search-filter-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filter-box select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

.filter-box select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .search-filter-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ==========================================
   PDF INLINE VIEWER POPUP/MODAL
   ========================================== */
.pdf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.pdf-modal-overlay.active {
  display: flex;
}

.pdf-modal-container {
  background: #090a10;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 1000px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pdf-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.pdf-action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.pdf-modal-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.pdf-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.pdf-modal-iframe-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  background: #1e1e24;
}

.pdf-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Bookmark & Action Controls inside Cards */
.card-header-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.bookmark-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.bookmark-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.bookmark-btn.active {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* ==========================================
   BATCH TAGS ROW (Hero section)
   ========================================== */
.batch-tags-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.batch-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ==========================================
   MARK DONE BUTTON (Lectures)
   ========================================== */
.mark-done-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.mark-done-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.mark-done-btn.done {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

/* ==========================================
   DPP SOLUTIONS LINK
   ========================================== */
.doc-solutions-link {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: underline;
  margin: 8px 0;
  cursor: pointer;
}

/* ==========================================
   USEFUL LINKS SECTION
   ========================================== */
.section-grid--links {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.useful-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.useful-link-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.useful-link-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.useful-link-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.useful-link-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.useful-link-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
}

.useful-link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.useful-link-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.useful-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid;
  transition: var(--transition);
  margin-top: auto;
}

.useful-link-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* ==========================================
   CONTROLS PANEL — FIXED LAYOUT
   ========================================== */
.batch-controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.progress-tracker-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-title {
  color: var(--text-secondary);
}

.progress-percent {
  color: var(--primary);
}

.progress-bar-container {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 0.6s ease;
}

.search-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.search-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filter-box select {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.filter-box select:focus {
  border-color: var(--primary);
}

/* ==========================================
   RESPONSIVE — MOBILE
   ========================================== */
@media (max-width: 600px) {
  .search-filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-box select {
    width: 100%;
  }

  .useful-link-card {
    padding: 16px;
  }

  .batch-controls-panel {
    padding: 14px 16px;
  }
}