:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --page: #f6f7fb;          /* Solid page background fixes the "column" */
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.25s ease;
}

/* Reset & base */
* { box-sizing: border-box; }
html { height: 100%; }

body {
  min-height: 100svh;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--page);
  display: flex;             /* Changed from grid to flex */
  flex-direction: column;    /* Stack items vertically */
  align-items: center;       /* Center items horizontally */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Card ---------- */
/* New Code */
/* New Code */
.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 36px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  text-align: center;
  animation: fade-in 0.45s ease both;
  margin: auto; /* This keeps the login card centered vertically and horizontally */
}


@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 24px;
}

/* ---------- Form ---------- */
.field { position: relative; margin-bottom: 14px; }

.field input {
  width: 100%;
  padding: 14px 44px 14px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #9ca3af;
  padding: 2px 6px;
  border-radius: 8px;
}

.toggle-password:hover { color: var(--primary); }

/* ---------- Button ---------- */
.btn {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), transform 0.05s ease;
}

.btn:hover,
.btn:focus-visible { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }

/* ---------- Messages ---------- */
#message {
  margin-top: 14px;
  font-size: 0.93rem;
  font-weight: 500;
  min-height: 1.2em;
}

.error { color: #d52731; }
.success { color: #269f53; }

/* ---------- Logout button ---------- */
/* Tiny logout icon (top-left of the page) */
.logout-icon {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
  transition: background var(--transition), transform 0.05s ease;
  z-index: 1000;
}
.logout-icon i {
  font-size: 14px;   /* slightly larger than before */
  line-height: 1;
}

.logout-icon:hover { background: var(--primary-dark); }
.logout-icon:active { transform: translateY(1px); }


/* --- Old Code (for reference) --- */
/* .logout-icon { ... } */

/* --- New Code Block --- */
.approved-link-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: #10b981; /* Green color */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
  font-size: 1.2rem;
}
.approved-link-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
  background: #059669;
}


/* ========== APP CONTAINER ========== */
.app-container {
  width: 100%;
  max-width: 1600px;
  padding: 20px 40px;
  margin: 60px auto 40px;
}

/* New Code for Video Input */
/* ========== TOP DASHBOARD (Split Layout) ========== */
.dashboard-top-section {
  display: flex;
  gap: 24px;
  width: 100%;
  margin-bottom: 40px;
  align-items: stretch; /* Makes both cards equal height */
}

/* --- Common Card Style for Top Section --- */
.video-input-card, 
.html-display-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-input-card:hover,
.html-display-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.1);
}

/* --- LEFT: Video Input (30%) --- */
.video-input-card {
  flex: 3; /* Takes up 30% roughly */
  min-width: 280px;
}

.card-header-small {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header-small i {
  color: var(--primary);
}

.input-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-column input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.2s;
}

.input-column input:focus {
  border-color: var(--primary);
  background: #fff;
}

.submit-btn-block {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn-block:hover {
  background: var(--primary-dark);
}

.video-message {
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
}

/* --- RIGHT: HTML Display (70%) --- */
/* --- RIGHT: HTML Display (70%) --- */
.html-display-card {
  flex: 7; 
  position: relative; /* Needed for absolute button positioning */
  min-height: 220px;  /* Fixed height for consistency */
  max-height: 220px;
  overflow: hidden;
}

.html-content-body {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  height: 120px;      /* Restrict text height */
  overflow: hidden;   /* Hide overflow text */
}

/* Fade effect at the bottom of the text */
.topic-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
  pointer-events: none; /* Let clicks pass through */
}

/* The View Button */
.view-topic-btn {
  position: absolute;
  bottom: 16px;
  right: 20px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-topic-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== TOPIC MODAL ========== */
.topic-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2100; /* Higher than video modal */
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.topic-modal.active {
  display: grid;
  opacity: 1;
}

.topic-modal-content {
  background: #fff;
  width: 100%;
max-width: 800px;
  max-height: 90vh; /* Dynamic height: shrinks for small content, scrolls for large */
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.topic-modal.active .topic-modal-content {
  transform: scale(1);
}

.topic-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
}

.topic-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #111827;
}

.close-topic-modal {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-topic-modal:hover {
  background: #fee2e2;
  color: #dc2626;
}

.topic-modal-body {
  flex: 1;
  padding: 30px; /* Nice spacious padding */
  overflow-y: auto; /* Scrollable */
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
}

/* Responsive Image inside content */
.topic-modal-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 10px 0;
}

/* Responsive: Stack them on mobile */
@media (max-width: 900px) {
  .dashboard-top-section {
    flex-direction: column;
  }
  
  .video-input-card, 
  .html-display-card {
    width: 100%;
    flex: none;
  }
}



/* ========== VIDEO GALLERY ========== */
.video-gallery-section {
  width: 100%;
  animation: fade-in 0.45s ease both;
}

.gallery-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.gallery-header i {
  font-size: 1.4rem;
  color: var(--primary);
  background: rgba(13, 110, 253, 0.1);
  padding: 10px;
  border-radius: 12px;
}

.gallery-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* --- THE NEW MODERN CARD --- */
.video-thumbnail {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: default;     /* <--- CHANGED: Hand tool removed */
  background: #ffffff; /* White background for the card */
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid #f0f0f0;
}

.video-thumbnail:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

/* The Colored Area (Top part) */
/* The Colored Area (Top part) */
.video-poster {
  width: 100%;
  aspect-ratio: 2.5 / 1; 
  position: relative;
  /* Background is now generated by JS for lighter colors */
}

/* --- Topic ID Badge --- */
.topic-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #ffffff;             /* Solid White Background */
  color: #374151;                  /* Dark Text for contrast */
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Soft shadow to lift it up */
  transition: all 0.2s ease;
  border: none;                    /* Removed the border */
}

.topic-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
  color: var(--primary);           /* Turn blue on hover */
}

.topic-badge:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.play-icon-wrapper {
  cursor: pointer;    /* <--- NEW: Hand tool added here */
  position: absolute;
  top: 12px;
  left: 12px;         /* Or 'right: 12px' if you prefer it on the right */
  width: 44px;
  height: 44px;
  background: #ffffff;           /* Solid White */
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border: none;
}

.play-icon-wrapper i {
  color: var(--primary);         /* Blue Icon */
  font-size: 1.1rem;
  margin-left: 3px;              /* Center the triangle visually */
}

/* NEW: Only apply effect when hovering the BUTTON itself */
.play-icon-wrapper:hover {
  transform: scale(1.15);        /* Grow bigger */
  box-shadow: 0 12px 25px rgba(13, 110, 253, 0.25); /* Blue glow shadow */
  background: #fff;
}

.play-icon-wrapper:hover i {
  color: var(--primary-dark);    /* Darker blue icon */
}

/* The New White Info Section */
.video-info {
  background: #ffffff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}


/* New styles for Name and Email combined */
.user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

/* Style for the (email) part inside the name */
.user-name span {
  font-weight: 400;
  color: #6b7280; /* Gray color for the (email) part */
  font-size: 0.9rem;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 50%;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-email {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.created-date {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 4px; /* Add a little space above date */
}

.empty-gallery {
  /* Keep existing styles, just ensure it doesn't break */
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  border: 2px dashed #e5e7eb;
  border-radius: 16px;
}

/* ========== VIDEO MODAL ========== */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(240, 240, 240, 0.95); /* Light background */
  z-index: 2000;
  place-items: center;
}

.video-modal.active {
  display: grid;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1400px; /* Increases the max size of the video player */
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #000; /* Black icon so it is visible on light background */
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.close-modal:hover {
  opacity: 1;
}

/* Updated to round the edges more and include the Plyr container */
.modal-content video,
.modal-content .plyr {
  width: 100%;
  border-radius: 24px;  /* Makes the edges much rounder */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Softer shadow for a slender look */
  overflow: hidden;     /* Ensures the video content clips to the round corners */
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .app-container {
    padding: 16px;
    margin-top: 50px;
  }
  
  .video-gallery {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 500px) {
  .app-container {
    padding: 12px;
    margin-top: 50px;
  }
  
  .video-input-card {
    padding: 12px 16px;
  }
  
  .submit-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .video-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .gallery-header h2 {
    font-size: 1rem;
  }
}





/* --- New Jump Button Style --- */
.jump-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10; /* Ensures it sits on top of the image */
  background: linear-gradient(135deg, #b92b27 10%, #1565C0 100%); /* Colorful Red-Blue Gradient */
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jump-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(21, 101, 192, 0.5);
}


/* --- Button on top of the Video Player --- */
.jump-modal-btn {
  position: absolute;
  top: 20px;          /* Distance from top of video */
  right: 20px;        /* Distance from right of video */
  z-index: 50;        /* Ensures it sits ON TOP of the video */
  
  /* Colorful Gradient (Pink/Purple) */
  background: linear-gradient(90deg, #DA22FF 0%, #9733EE 100%);
  color: white;
  
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Strong shadow for visibility on black */
  transition: transform 0.2s ease;
}

.jump-modal-btn:hover {
  transform: scale(1.1); /* Pop effect */
}

/* --- Video Action Buttons (Approve/Disapprove) --- */
.video-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column; /* Stacks them vertically */
  gap: 8px;               /* Space between the two buttons */
  z-index: 20;            /* Ensures they sit on top of everything */
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Approve (Green) */
.approve-btn { color: #10b981; }
.approve-btn:hover { background: #10b981; color: white; }

/* Disapprove (Red) */
.disapprove-btn { color: #ef4444; }
.disapprove-btn:hover { background: #ef4444; color: white; }


/* --- Video Action Buttons (Approve/Disapprove) --- */
.video-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  
  /* HIDDEN BY DEFAULT */
  opacity: 0;
  transform: translateY(-5px); /* Moves up slightly */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; /* Prevents clicking when hidden */
}

/* SHOW ON HOVER */
/* When you hover the card, show the actions */
.video-thumbnail:hover .video-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; /* Re-enable clicking */
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  
  /* Glass/Clean Look */
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

/* Hover Effects for Buttons */
.action-btn:hover {
  transform: scale(1.15); /* Grows bigger */
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Approve (Green) */
.approve-btn { color: #059669; }
.approve-btn:hover { 
  background: #10b981; 
  color: white; 
}

/* Disapprove (Red) */
.disapprove-btn { color: #dc2626; }
.disapprove-btn:hover { 
  background: #ef4444; 
  color: white; 
}


/* --- Criteria Checklist Styles --- */
.criteria-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The top part: Text + Buttons */
.criteria-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.criteria-text {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;
  flex: 1; /* Takes remaining space */
}

/* Action Buttons Container */
.criteria-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Common Button Style */
.status-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #9ca3af;
}

.status-btn:hover {
  transform: scale(1.1);
}

/* Approve Button Colors */
.status-btn.btn-approve:hover,
.status-btn.btn-approve.active {
  background: #d1fae5;
  color: #059669;
  border-color: #059669;
}

/* Disapprove Button Colors */
.status-btn.btn-disapprove:hover,
.status-btn.btn-disapprove.active {
  background: #fee2e2;
  color: #dc2626;
  border-color: #dc2626;
}

/* Feedback Input Box */
.criteria-feedback {
  display: none; /* Hidden by default */
  width: 100%;
  animation: fade-in 0.3s ease;
}

.criteria-feedback input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #f8fafc;
  outline: none;
  transition: border 0.2s;
}

.criteria-feedback input:focus {
  border-color: #dc2626; /* Red border when typing feedback */
  background: #fff;
}

/* Approved State for the whole row */
.criteria-row.approved-state {
  border-color: #34d399; /* Green Border */
  background: #ecfdf5;   /* Light Green BG */
}

.criteria-empty {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 20px;
}


/* ========== SUMMARY POPUP STYLES ========== */
.summary-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  align-items: flex-start;
}

.summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 0.9rem;
  margin-top: 2px;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}

.summary-feedback {
  font-size: 0.9rem;
  color: #dc2626; /* Red text for feedback */
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 6px;
  border: 1px dashed #fca5a5;
}

/* Styles for Approved State */
.summary-item.is-approved {
  background: #ecfdf5; /* Light Green */
  border-color: #a7f3d0;
}
.summary-item.is-approved .summary-icon {
  background: #10b981; /* Green Icon */
}

/* Styles for Disapproved State */
.summary-item.is-disapproved {
  background: #fef2f2; /* Light Red */
  border-color: #fecaca;
}
.summary-item.is-disapproved .summary-icon {
  background: #ef4444; /* Red Icon */
}


/* ============ MARKING POPUP SPLIT LAYOUT ============ */
/* Make this specific modal wider */
.topic-modal-content.marking-wide-modal {
  max-width: 95vw; /* Almost full width */
  height: 90vh;    /* Fixed height */
  display: flex;
  flex-direction: column;
}

/* The container for the split view */
.marking-layout {
  display: flex;
  flex: 1; /* Fills remaining height */
  overflow: hidden; /* Prevents double scrollbars */
}

/* LEFT: Video Column - Clean & Transparent */
.marking-video-column {
  flex: 6; 
  /* 1. Transparent background removes the black box */
  background: transparent; 
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* 2. Reduced padding helps the layout fit better */
  padding: 10px; 
  
  position: relative;
  border-right: 1px solid #e5e7eb; 
}

/* --- NEW DASHED RING STYLES (SMALLER DASHES) --- */

/* 1. The Wrapper (The Dashed Ring) */
.video-dashed-wrapper {
  position: relative;
  width: 100%;
  
  /* Keep the tight gap */
  padding: 6px;
  
  /* KEY CHANGE: 1.5px makes the dashes shorter and more detailed */
  border: 1.5px dashed #DA22FF;
  
  border-radius: 20px; 
  
  /* Soft Glow Effect */
  box-shadow: 0 0 15px rgba(218, 34, 255, 0.4); 
  
  /* Optional: Background inside the ring */
  background: #fff;
}

/* 2. The Inner Video */
.video-dashed-wrapper video,
.video-dashed-wrapper .plyr {
  width: 100%;
  height: 100%;
  display: block;
  
  /* Inner radius slightly smaller to match parallel curves */
  border-radius: 14px; 
  
  overflow: hidden;
}

/* 2. The Inner Video */
.video-dashed-wrapper video,
.video-dashed-wrapper .plyr {
  width: 100%;
  height: 100%;
  display: block;
  
  /* Math: Outer Radius (20px) - Padding (6px) = 14px */
  border-radius: 14px; 
  
  overflow: hidden;
}

/* RIGHT: Criteria Column */
.marking-criteria-column {
  flex: 4; /* Takes 40% of width */
  background: #fff;
  overflow-y: auto; /* Only this part scrolls */
  padding: 24px;
  border-left: 1px solid #e5e7eb;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
  .marking-layout {
    flex-direction: column;
    overflow-y: auto;
  }
  .marking-video-column {
    flex: none;
    height: 300px; /* Fixed height for video on mobile */
    padding: 0;
  }
  .marking-video-column video {
    border-radius: 0;
  }
  .marking-criteria-column {
    flex: none;
    overflow: visible;
  }
}



/* --- New Marking Jump Badge --- */
.marking-jump-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20; /* Sits above the video */
  
  /* Glass Effect */
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: 99px; /* Pill shape */
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.marking-jump-btn i {
  color: #60a5fa; /* Light blue icon */
}

.marking-jump-btn:hover {
  background: var(--primary); /* Turns blue on hover */
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.marking-jump-btn:hover i {
  color: #fff;
}


.summary-split-container {
  display: flex;
  gap: 24px;
  height: 100%; /* CHANGED: Fill the parent height */
  overflow: hidden;
  padding-bottom: 10px;
}

/* Left side (Results) */
.summary-left {
  flex: 1;
  overflow-y: auto; /* Internal scrolling */
  padding-right: 8px; /* Space for scrollbar */
}

/* Right side (Topic Content) */
.summary-right {
  flex: 1;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Ensures child scrolls, not parent */
}

.summary-right-header {
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.summary-right-content {
  padding: 16px;
  overflow-y: auto; /* Scroll if text is too long */
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
}

.summary-right-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
  .summary-split-container {
    flex-direction: column;
    height: auto;
  }
  .summary-left, .summary-right {
    flex: none;
    max-height: 400px;
  }
}




/* Wide Summary Modal Style */
.topic-modal-content.summary-wide-modal {
  max-width: 95vw; /* 95% of screen width */
  width: 95vw;
  height: 90vh;    /* 90% of screen height */
  display: flex;
  flex-direction: column;
}


/* ========== TEACHER FILTER SECTION ========== */
.filter-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  margin-bottom: 30px;
  width: 100%;
  animation: fade-in 0.4s ease both;
}

.filter-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-inputs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
}

.filter-group input {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  background: #f9fafb;
  width: 100%;
  transition: all 0.2s;
}

.filter-group input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}

.btn-clear {
  padding: 12px 18px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  height: 46px;
  transition: all 0.2s;
}

.btn-clear:hover {
  background: #e5e7eb;
  color: #111827;
}

.filter-stats {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #9ca3af;
  font-style: italic;
  text-align: right;
}

/* ========== PAGINATION ========== */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: grid;
  place-items: center;
}

.page-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.page-input {
  width: 60px;
  height: 40px;
  padding: 5px;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
}

.page-input:focus {
  border-color: var(--primary);
}


/* --- TOGGLE SWITCH STYLES --- */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-label {
  font-weight: 600;
  color: #10b981;
  font-size: 0.9rem;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #10b981; /* Green when active */
}
input:checked + .slider:before {
  transform: translateX(20px);
}


/* ============ REDO BADGE STYLES ============ */

/* Ensure the containers are relative so the badge sits correctly */
.html-content-body, 
.topic-modal-body {
  position: relative; 
}

.redo-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #fee2e2;       /* Light red background */
  color: #dc2626;            /* Strong red text */
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 0 0 0 12px; /* Curved bottom-left corner */
  border-left: 1px solid #fca5a5;
  border-bottom: 1px solid #fca5a5;
  box-shadow: -2px 2px 6px rgba(0,0,0,0.05);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Specific adjustment for the dashboard card to prevent overlap */
#topicPreview .redo-badge {
  top: 0;
  right: 0;
}


/* ============ STATUS BADGES (Approved/Disapproved) ============ */
.status-tag-approved {
  position: absolute; 
  top: 10px; 
  right: 10px;
  background: #10b981; 
  color: white; 
  padding: 6px 12px;
  border-radius: 20px; 
  font-size: 0.8rem; 
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 10;
}

.status-tag-disapproved {
  position: absolute; 
  top: 10px; 
  right: 10px;
  background: #ef4444; 
  color: white; 
  padding: 6px 12px;
  border-radius: 20px; 
  font-size: 0.8rem; 
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 10;
}