/* ----------------------------------------------------
   DESIGN SYSTEM & CUSTOM VARIABLE MAPPING
   ---------------------------------------------------- */
:root {
  /* HSL Harmonies */
  --primary-h: 161;
  --primary-s: 94%;
  --primary-l: 13%; /* emerald-950 deep base */
  
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;
  --emerald-950: #022c22;
  
  --yellow-400: #facc15;
  --yellow-500: #eab308;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  --red-500: #ef4444;
  --red-600: #dc2626;
  
  --white: #ffffff;
  
  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  
  /* Transition settings */
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-card: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* ----------------------------------------------------
   BASE ELEMENTS RESET
   ---------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ----------------------------------------------------
   1. GREEN TOP ALERT BAR
   ---------------------------------------------------- */
.top-alert-bar {
  background-color: var(--emerald-950);
  color: var(--emerald-100);
  font-size: 0.85rem;
  padding: 8px 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.alert-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.alert-divider {
  color: rgba(255,255,255,0.25);
  font-size: 1rem;
  flex-shrink: 0;
}

.alert-right {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: right;
  /* Always visible - both languages show together */
  display: block !important;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--yellow-400);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-blink 1.5s infinite;
}

.alert-right {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
}

@keyframes pulse-blink {
  0% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px var(--yellow-400); }
  100% { transform: scale(0.9); opacity: 0.4; }
}

/* ----------------------------------------------------
   2. MAIN HEADER
   ---------------------------------------------------- */
.main-header {
  background-color: var(--emerald-900);
  color: var(--white);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  border-bottom: 4px solid var(--yellow-400);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}

.logo-icon-wrapper {
  background-color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--emerald-700);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  gap: 6px;
}

.white-text { color: var(--white); }
.yellow-text { color: var(--yellow-400); }

.logo-slogan {
  font-size: 0.8rem;
  color: var(--emerald-100);
  font-weight: 400;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background-color: transparent;
  transition: var(--transition-smooth);
}

.nav-btn i {
  width: 18px;
  height: 18px;
}

.nav-btn:hover {
  background-color: var(--emerald-850);
}

.active-courses-badge {
  background-color: var(--emerald-950);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: default;
}

.active-courses-badge:hover {
  background-color: var(--emerald-950);
}

.active-courses-badge span span {
  color: var(--yellow-400);
  font-weight: bold;
}

.whatsapp-btn {
  background-color: var(--emerald-600);
  box-shadow: var(--shadow-sm);
}

.whatsapp-btn:hover {
  background-color: var(--emerald-700);
  transform: translateY(-1px);
}

/* ----------------------------------------------------
   3. APP MAIN LAYOUT
   ---------------------------------------------------- */
.app-main {
  flex: 1;
  width: 100%;
}

.app-view {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-view.active {
  display: block;
  opacity: 1;
}

/* ----------------------------------------------------
   4. HOME VIEW: HERO BANNER — Card Style like Reference
   ---------------------------------------------------- */

/* Outer wrapper: light gray bg with padding */
.hero-banner {
  background-color: var(--slate-100);
  padding: 30px 24px 10px 24px;
  border-bottom: 1px solid var(--slate-200);
}

/* Inner card: dark green rounded card */
.hero-banner .hero-card-inner {
  background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-950) 100%);
  border-radius: 20px;
  padding: 50px 40px;
  max-width: 1350px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(2, 44, 34, 0.25);
}

.hero-banner .hero-card-inner::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 180%;
  height: 200%;
  background: radial-gradient(circle, rgba(4,120,87,0.18) 0%, rgba(2,44,34,0) 65%);
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
  text-align: left;
}

.hero-badge {
  background-color: rgba(250, 204, 21, 0.15);
  color: var(--yellow-400);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  border: 1px solid rgba(250, 204, 21, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-badge i {
  width: 13px;
  height: 13px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.8px;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero-desc {
  font-size: 1rem;
  color: var(--slate-300);
  font-weight: 400;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 640px;
}

.hero-features {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.feature-tag {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
}

.feature-tag i {
  width: 15px;
  height: 15px;
  color: var(--yellow-400);
}

/* ----------------------------------------------------
   5. STICKY SEARCH & CATEGORIES BAR
   ---------------------------------------------------- */
.sticky-search-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 20px 24px;
  position: sticky;
  top: 85px;
  z-index: 90;
  max-width: 1400px;
  margin: 20px auto 30px auto;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--slate-400);
}

.search-box-wrapper input {
  width: 100%;
  padding: 16px 50px 16px 56px;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 1.5px solid var(--slate-200);
  background-color: var(--white);
  color: var(--slate-800);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.search-box-wrapper input:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
  outline: none;
}

.clear-search-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.clear-search-btn:hover {
  color: var(--slate-800);
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  transition: var(--transition-smooth);
}

.filter-tab:hover {
  background-color: var(--slate-200);
  color: var(--slate-800);
}

.filter-tab.active {
  background-color: var(--emerald-900);
  color: var(--white);
  border-color: var(--emerald-900);
}

/* ----------------------------------------------------
   6. COURSE CATALOG VIEW
   ---------------------------------------------------- */
.catalog-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 60px 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 2px dashed var(--slate-200);
  padding-bottom: 12px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  color: var(--emerald-700);
  width: 24px;
  height: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-800);
}

.match-counter {
  font-size: 0.9rem;
  color: var(--slate-500);
  font-weight: 500;
  background-color: var(--slate-100);
  padding: 6px 12px;
  border-radius: 30px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* Course Card Item */
.course-card {
  background-color: var(--white);
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition-card);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--emerald-100);
}

.card-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.level-badge {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-badge {
  background-color: var(--slate-900);
  color: var(--yellow-400);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-heading);
}

.course-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 8px;
  height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-semester {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-bottom: 20px;
  font-weight: 500;
}

.course-card-semester i {
  width: 14px;
  height: 14px;
}

.assignment-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.assignment-btn-preview {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  width: 100%;
  transition: var(--transition-smooth);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.assignment-btn-preview:hover {
  background-color: rgba(5, 150, 105, 0.04);
  border-color: var(--emerald-600);
}

.preview-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-800);
}

.preview-meta {
  font-size: 0.72rem;
  color: var(--slate-400);
  font-weight: 500;
}

.preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-700);
  background-color: rgba(5, 150, 105, 0.08);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.preview-icon i {
  width: 16px;
  height: 16px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--slate-100);
}

.card-footer-left {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--emerald-600);
  font-weight: 600;
}

.card-footer-left i {
  width: 14px;
  height: 14px;
}

.view-book-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.view-book-link:hover {
  color: var(--emerald-900);
  transform: translateX(2px);
}

/* No results card design */
.no-results-card {
  text-align: center;
  background-color: var(--white);
  border-radius: 20px;
  border: 1px dashed var(--slate-300);
  padding: 50px 30px;
  max-width: 600px;
  margin: 30px auto 0 auto;
  box-shadow: var(--shadow-sm);
}

.no-results-icon {
  width: 60px;
  height: 60px;
  color: var(--slate-400);
  margin-bottom: 20px;
}

.no-results-card h4 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-800);
  margin-bottom: 10px;
}

.no-results-card p {
  color: var(--slate-500);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.whatsapp-cta-btn {
  background-color: var(--emerald-600);
  color: var(--white);
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.whatsapp-cta-btn:hover {
  background-color: var(--emerald-700);
  transform: translateY(-2px);
}

/* ----------------------------------------------------
   7. DETAILED VIEWS LAYOUT
   ---------------------------------------------------- */
.detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background-color: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 30px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.back-btn:hover {
  background-color: var(--slate-50);
  color: var(--slate-900);
  transform: translateX(-3px);
}

.detail-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 30px;
  align-items: start;
}

/* Left Panel: Course specs & download options */
.detail-info-card {
  background-color: var(--white);
  border-radius: 20px;
  border: 1px solid var(--slate-200);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.detail-level-badge {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  margin-right: 6px;
}

.detail-code-badge {
  background-color: var(--slate-900);
  color: var(--yellow-400);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.detail-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 14px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.detail-meta-row {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 30px;
  font-weight: 500;
}

.detail-meta-row i {
  width: 14px;
  height: 14px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--slate-100);
  padding-top: 24px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.download-pdf-btn {
  background: linear-gradient(135deg, var(--emerald-700) 0%, var(--emerald-800) 100%);
  border-bottom: 3px solid var(--emerald-950);
}

.download-pdf-btn:hover {
  background: linear-gradient(135deg, var(--emerald-800) 0%, var(--emerald-900) 100%);
  transform: translateY(-1px);
}

.action-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.action-sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.action-sub-btn:hover {
  background-color: var(--slate-200);
  color: var(--slate-900);
}

.action-sub-btn i {
  width: 16px;
  height: 16px;
}

/* Handwritten order alert inside article */
.article-whatsapp-promo {
  background-color: var(--emerald-50);
  border: 1.5px dashed var(--emerald-600);
  border-radius: 16px;
  padding: 20px;
  margin-top: 30px;
}

.promo-header {
  display: flex;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.promo-icon {
  color: var(--emerald-700);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.promo-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--emerald-900);
}

.promo-header p {
  font-size: 0.78rem;
  color: var(--slate-600);
  margin-top: 4px;
  line-height: 1.4;
}

.promo-whatsapp-btn {
  background-color: var(--emerald-600);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.promo-whatsapp-btn:hover {
  background-color: var(--emerald-700);
}

/* Right Panel: Solved assignment content */
.assignment-viewer {
  background-color: var(--white);
  border-radius: 20px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.viewer-tabs {
  display: flex;
  background-color: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.viewer-tab {
  flex: 1;
  padding: 18px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-500);
  text-align: center;
  border-bottom: 3px solid transparent;
  transition: var(--transition-smooth);
}

.viewer-tab:hover {
  color: var(--slate-800);
  background-color: var(--slate-100);
}

.viewer-tab.active {
  color: var(--emerald-700);
  border-bottom-color: var(--emerald-700);
  background-color: var(--white);
}

.assignment-due-alert {
  background-color: #fef3c7; /* amber-100 */
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 24px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assignment-due-alert i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Document Paper Sheet layout with heavy dynamic watermark */
.assignment-paper-container {
  padding: 40px 30px;
  position: relative;
  min-height: 500px;
  overflow: hidden; /* Prevent rotated watermark text overflow */
}

/* Sticky Watermark text repeating diagonals */
.watermark-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 30px;
  opacity: 0.06; /* Heavy Watermark effect */
  padding: 20px;
}

.watermark-text-item {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
  transform: rotate(-35deg);
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Q&A elements styling */
.assignment-content-area {
  position: relative;
  z-index: 10;
}

.qa-block {
  margin-bottom: 40px;
}

.qa-block:last-child {
  margin-bottom: 0;
}

.qa-question-box {
  background-color: var(--slate-100);
  border-left: 5px solid var(--slate-900);
  padding: 20px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
}

.qa-q-num {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--emerald-700);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.qa-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.4;
}

.qa-answer-box {
  padding: 0 10px;
}

.qa-a-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  display: block;
}

.qa-answer-text {
  font-size: 0.98rem;
  color: var(--slate-700);
  line-height: 1.7;
  white-space: pre-line; /* preserves newlines in solved solutions */
}

/* ----------------------------------------------------
   8. ADMIN DASHBOARD & LOGIN MODAL
   ---------------------------------------------------- */
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 45px 24px 80px 24px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 20px;
  margin-bottom: 35px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title-area {
  display: flex;
  flex-direction: column;
}

.admin-title-area h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--slate-900);
}

.admin-title-area p {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-top: 4px;
}

.logout-btn {
  background-color: var(--red-500);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.logout-btn:hover {
  background-color: var(--red-600);
}

.admin-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 30px;
  align-items: start;
}

/* Form Settings elements */
.admin-settings-card, .admin-catalog-card {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.admin-settings-card h3, .admin-catalog-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-800);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
  outline: none;
}

.save-settings-btn {
  width: 100%;
  padding: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* CRUD operations list */
.catalog-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.add-course-btn {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-courses-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
}

.admin-courses-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-courses-table th, .admin-courses-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-200);
}

.admin-courses-table th {
  background-color: var(--slate-50);
  font-weight: 700;
  color: var(--slate-700);
}

.admin-courses-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-action-btn-row {
  display: flex;
  gap: 6px;
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.btn-edit {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-100);
}

.btn-edit:hover {
  background-color: var(--emerald-100);
}

.btn-delete {
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--red-500);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.15);
}

/* Modals overlays & components */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

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

.modal-card {
  background-color: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-premium);
  overflow: hidden;
  animation: modal-enter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-enter {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lock-icon {
  color: var(--yellow-500);
  width: 20px;
  height: 20px;
}

.modal-header h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close-btn {
  color: var(--slate-400);
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: var(--slate-800);
}

.modal-body {
  padding: 24px;
}

.modal-notice {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 18px;
  line-height: 1.4;
}

.error-msg {
  color: var(--red-500);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Specialized Big Form Modals for Courses setup */
.course-modal-overlay .modal-card {
  max-width: 800px;
}

.modal-form-divider {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--emerald-850);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--emerald-100);
  padding-bottom: 4px;
  margin: 24px 0 14px 0;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 16px;
}

.course-modal-card .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* General standard button classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--emerald-700);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--emerald-850);
}

.btn-secondary {
  background-color: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
  background-color: var(--slate-200);
  color: var(--slate-900);
}

.btn-success {
  background-color: var(--emerald-600);
  color: var(--white);
}

.btn-success:hover {
  background-color: var(--emerald-700);
}

.btn-danger {
  background-color: var(--red-500);
  color: var(--white);
}

.btn-danger:hover {
  background-color: var(--red-600);
}

/* ----------------------------------------------------
   9. INTERACTIVE FAQ SECTION
   ---------------------------------------------------- */
.faq-section {
  background-color: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  padding: 80px 24px;
}

.faq-header {
  max-width: 700px;
  margin: 0 auto 50px auto;
  text-align: center;
}

.faq-main-icon {
  width: 40px;
  height: 40px;
  color: var(--emerald-700);
  margin-bottom: 12px;
}

.faq-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.faq-subtitle {
  font-size: 1rem;
  color: var(--slate-500);
}

.faq-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.faq-card {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-q {
  display: flex;
  align-items: start;
  gap: 12px;
}

.faq-q-icon {
  background-color: var(--slate-900);
  color: var(--yellow-400);
  font-size: 0.75rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.faq-q h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.4;
}

.faq-a {
  padding-left: 40px;
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* Handwritten copy custom FAQ Highlight */
.highlight-faq {
  background-color: var(--emerald-50);
  border-color: var(--emerald-100);
  grid-column: span 2;
  box-shadow: var(--shadow-sm);
}

.highlight-badge {
  background-color: var(--emerald-950);
}

.service-pulse-tag {
  background-color: var(--emerald-600);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  animation: pulse-badge-blink 2s infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes pulse-badge-blink {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 6px var(--emerald-600); }
  100% { transform: scale(1); opacity: 0.8; }
}

.highlight-text {
  color: var(--slate-700);
  font-size: 0.98rem;
}

.faq-whatsapp-btn {
  background-color: var(--emerald-600);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.faq-whatsapp-btn:hover {
  background-color: var(--emerald-700);
  transform: translateY(-1px);
}

/* ----------------------------------------------------
   10. FOOTER SECTION
   ---------------------------------------------------- */
.main-footer {
  background-color: var(--slate-900);
  color: var(--slate-300);
  padding: 70px 24px 30px 24px;
  border-top: 6px solid var(--yellow-400);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--slate-800);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-icon {
  color: var(--yellow-400);
  width: 32px;
  height: 32px;
}

.footer-logo h4 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--slate-400);
}

.footer-links-grid h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
}

.footer-column h5 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 18px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.footer-column ul li a {
  transition: var(--transition-smooth);
}

.footer-column ul li a:hover {
  color: var(--yellow-400);
  padding-left: 2px;
}

.footer-column p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 30px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* ----------------------------------------------------
   11. PRINT CONTEXT RULES (WATERMARK HIDDEN PREVIEWS)
   ---------------------------------------------------- */
@media print {
  body {
    background-color: var(--white);
    color: #000;
  }
  
  .top-alert-bar, .main-header, .back-btn, .detail-info-card, .viewer-tabs, .assignment-due-alert, .main-footer {
    display: none !important;
  }
  
  .app-main {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .detail-container {
    padding: 0 !important;
  }
  
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
  
  .assignment-viewer {
    border: none !important;
    box-shadow: none !important;
  }
  
  .assignment-paper-container {
    padding: 0 !important;
  }
  
  /* Prints with slight watermark overlay */
  .watermark-overlay-container {
    opacity: 0.05 !important;
  }
}

/* ----------------------------------------------------
   12. FULL MOBILE RESPONSIVE — A to Z
   ---------------------------------------------------- */

/* ===== TABLET: 1200px ===== */
@media (max-width: 1200px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-info-card {
    position: static;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* ===== TABLET/LANDSCAPE: 992px ===== */
@media (max-width: 992px) {
  /* Header */
  .header-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .logo-title {
    font-size: 1.3rem;
  }

  /* Hero */
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-banner {
    padding: 20px 20px 16px 20px;
  }
  .hero-banner .hero-card-inner {
    padding: 40px 36px;
    border-radius: 18px;
  }

  /* Search */
  .sticky-search-container {
    position: static;
    margin-top: 20px;
    border-radius: 14px;
  }

  /* Support corner */
  .support-tabs-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .support-corner-header {
    flex-direction: column;
    gap: 14px;
  }
  .support-main-title {
    font-size: 1.2rem;
  }

  /* FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .highlight-faq {
    grid-column: span 1;
  }

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  /* Admin */
  .assignments-editor-grid {
    grid-template-columns: 1fr !important;
  }
  .form-row-3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== MOBILE: 768px ===== */
@media (max-width: 768px) {
  /* Alert bar - stack on mobile */
  .alert-container {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  .alert-left {
    justify-content: center;
  }
  .alert-right {
    text-align: center;
  }
  .alert-divider {
    display: none;
  }

  /* Header */
  .main-header {
    position: relative !important; /* Non-sticky on mobile, scrolls away naturally */
    padding: 12px 16px;
    border-bottom: 4px solid var(--yellow-400);
  }
  .header-container {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .logo-area {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
  }
  .logo-title {
    font-size: 1.3rem !important;
  }
  .logo-slogan {
    display: block !important;
    font-size: 0.72rem !important;
    color: var(--emerald-100) !important;
    margin-top: 2px !important;
    text-align: center !important;
  }
  .logo-icon-wrapper {
    width: 40px !important;
    height: 40px !important;
    background-color: var(--white) !important;
  }
  .logo-icon {
    width: 22px !important;
    height: 22px !important;
    color: var(--emerald-700) !important;
  }
  .nav-links {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Symmetric 50/50 split! */
    gap: 8px !important;
    width: 100% !important;
  }
  .nav-btn span {
    display: inline !important;
  }
  .active-courses-badge {
    display: none !important;
  }
  #homeNavBtn {
    grid-column: span 2 !important;
    background-color: #facc15 !important; /* Yellow/orange */
    color: #022c22 !important; /* Dark green */
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
  }
  #homeNavBtn i {
    color: #022c22 !important;
  }
  #adminNavBtn {
    grid-column: span 1 !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
    border-radius: 8px !important;
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
  }
  #adminNavBtn i {
    color: var(--white) !important;
  }
  #whatsappNavBtn {
    grid-column: span 1 !important;
    background-color: #22c55e !important; /* Vibrant green */
    color: var(--white) !important;
    border-radius: 8px !important;
    width: 100% !important; /* 50% width matching admin panel! */
    height: 42px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    flex-shrink: 0 !important;
    font-size: 0.82rem !important;
  }
  #whatsappNavBtn span {
    display: inline !important; /* Explicitly show the text on a single line! */
    white-space: nowrap !important;
  }
  #whatsappNavBtn i {
    width: 18px !important;
    height: 18px !important;
    color: var(--white) !important;
  }

  /* Hero */
  .hero-banner {
    padding: 16px 16px 12px 16px;
  }
  .hero-banner .hero-card-inner {
    padding: 28px 22px;
    border-radius: 14px;
  }
  .hero-title {
    font-size: 1.6rem;
    letter-spacing: -0.3px;
  }
  .hero-desc {
    font-size: 0.88rem;
    max-width: 100%;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
  .hero-features {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 14px !important;
  }
  .feature-tag {
    font-size: 0.76rem !important;
    padding: 6px 10px !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* Search box */
  .sticky-search-container {
    padding: 14px 16px;
    margin: 10px 16px;
    border-radius: 12px;
  }
  .search-box-wrapper input {
    padding: 12px 40px 12px 46px;
    font-size: 0.92rem;
  }
  .category-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 8px !important;
    width: 100% !important;
    padding-bottom: 0 !important;
  }
  .filter-tab {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 30px !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .filter-tab.active {
    background-color: #0f172a !important;
    color: var(--white) !important;
    border-color: #0f172a !important;
  }

  /* Support corner */
  .support-corner-section {
    padding: 0 16px;
    margin: 20px auto 10px auto;
  }
  .support-corner-container {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .support-tabs-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
    overflow-x: visible !important;
  }
  .support-tab-card {
    flex: none !important;
    width: 100% !important;
    padding: 12px !important;
    border-radius: 16px !important;
  }
  .tab-card-title-en {
    font-size: 0.78rem !important;
  }
  .tab-card-title-ur {
    font-size: 0.74rem !important;
    margin-top: 4px !important;
  }
  .tab-card-header {
    margin-bottom: 8px !important;
  }
  .tab-card-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
  }
  .tab-card-icon-wrapper i {
    width: 15px !important;
    height: 15px !important;
  }
  .tab-card-badge {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
  }
  .support-details-panel {
    padding: 16px !important;
    border-radius: 12px !important;
  }
  .support-details-grid {
    gap: 16px !important;
  }
  .support-status-box {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }
  .status-box-header {
    font-size: 0.72rem !important;
    margin-bottom: 4px !important;
  }
  .status-box-desc {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }
  .support-specs-table {
    gap: 8px !important;
    padding-top: 6px !important;
  }
  .support-spec-row {
    grid-template-columns: 100px 1fr !important;
    font-size: 0.8rem !important;
    padding-bottom: 6px !important;
  }
  .support-guidelines-list {
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .support-guidelines-list li {
    font-size: 0.8rem !important;
    padding-left: 20px !important;
    line-height: 1.4 !important;
  }
  .support-guidelines-list li::before {
    width: 12px !important;
    height: 12px !important;
    font-size: 6px !important;
    top: 3px !important;
  }
  .en-guidelines-card {
    padding: 12px !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }
  .en-guidelines-card h5 {
    font-size: 0.82rem !important;
    padding-bottom: 4px !important;
    margin-bottom: 8px !important;
  }
  .support-en-guidelines-list {
    gap: 6px !important;
  }
  .support-en-guidelines-list li {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    padding-left: 14px !important;
  }
  .support-en-guidelines-list li::before {
    font-size: 1rem !important;
    top: -3px !important;
  }
  .support-details-btn {
    background-color: var(--emerald-800) !important;
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
  }
  .support-details-btn:hover {
    background-color: var(--emerald-700) !important;
  }
  .support-cta-container {
    width: 100% !important;
    margin-top: 12px !important;
    align-self: stretch !important;
  }
  .tab-card-title-en {
    font-size: 0.78rem !important;
  }
  .tab-card-title-ur {
    font-size: 0.74rem !important;
  }
  .support-header-right {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .lang-switch-group {
    flex-wrap: nowrap !important;
    border-radius: 30px !important;
    width: auto;
  }
  .lang-switch-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Courses grid */
  .catalog-section {
    padding: 0 16px 40px 16px;
  }
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .section-title {
    font-size: 1.2rem;
  }

  /* Course card */
  .course-card {
    padding: 18px;
    border-radius: 14px;
  }
  .course-card-title {
    font-size: 1.05rem;
    height: auto;
  }

  /* Detail view */
  .detail-container {
    padding: 20px 16px 50px 16px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-title {
    font-size: 1.35rem;
  }
  .detail-info-card {
    padding: 20px;
    border-radius: 14px;
  }
  .assignment-paper-container {
    padding: 20px 16px;
  }
  .action-btn-row {
    grid-template-columns: 1fr 1fr;
  }

  /* Assignment viewer */
  .viewer-tab {
    padding: 12px 10px;
    font-size: 0.9rem;
  }
  .assignment-due-alert {
    padding: 8px 14px;
    font-size: 0.76rem;
    flex-wrap: wrap;
  }

  .faq-section {
    padding: 50px 16px;
  }
  .faq-title {
    font-size: 1.5rem;
  }
  .faq-card {
    padding: 18px;
  }
  .faq-a {
    padding-left: 24px;
  }

  /* Footer */
  .main-footer {
    padding: 40px 16px 24px 16px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 24px;
  }
  .footer-logo h4 {
    font-size: 1.1rem;
  }

  /* Admin panel */
  .admin-container {
    padding: 20px 16px 50px 16px;
  }
  .admin-dashboard-banner {
    padding: 20px 16px !important;
    border-radius: 14px !important;
  }
  .banner-title {
    font-size: 1.2rem !important;
  }
  .admin-nav-tabs {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .admin-tab-btn {
    flex: 1 !important;
    min-width: 120px !important;
    font-size: 0.8rem !important;
    padding: 10px 10px !important;
    justify-content: center !important;
  }
  .admin-card {
    padding: 16px !important;
    border-radius: 14px !important;
  }
  .form-row-3 {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .levels-checkbox-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .editor-toolbar {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .wysiwyg-editor {
    min-height: 180px !important;
    font-size: 0.9rem !important;
  }
  .publish-footer {
    flex-direction: column;
  }
  .publish-footer button {
    width: 100%;
  }
  .admin-courses-table th,
  .admin-courses-table td {
    padding: 10px 10px;
    font-size: 0.82rem;
  }

  /* Modal */
  .modal-card {
    border-radius: 16px;
    max-width: 100%;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-footer {
    padding: 12px 18px;
  }

  /* Settings form */
  .card-header-row {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }
  .add-course-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SMALL MOBILE: 480px ===== */
@media (max-width: 480px) {
  /* Alert */
  .top-alert-bar {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
  .alert-right {
    display: none; /* Hide Urdu on very small screens - too tight */
  }
  .alert-divider {
    display: none;
  }

  /* Header */
  .logo-area {
    gap: 8px;
  }
  .logo-title {
    font-size: 1rem;
  }

  /* Hero */
  .hero-banner {
    padding: 12px 12px 8px 12px;
  }
  .hero-banner .hero-card-inner {
    padding: 22px 16px;
    border-radius: 12px;
  }
  .hero-title {
    font-size: 1.4rem;
  }
  .hero-desc {
    font-size: 0.83rem;
  }
  /* Hero features are in a 2x2 grid */
  .hero-badge {
    font-size: 0.68rem;
  }



  /* Support corner */
  .support-main-title {
    font-size: 1.05rem;
  }
  .support-subtitle {
    font-size: 0.82rem;
  }

  /* Courses */
  .course-card {
    padding: 14px;
  }
  /* Assignment preview buttons keep horizontal single-row layout */

  /* Detail */
  .detail-title {
    font-size: 1.2rem;
  }
  .action-btn {
    font-size: 0.85rem;
    padding: 12px 14px;
  }
  .action-btn-row {
    grid-template-columns: 1fr;
  }
  .article-whatsapp-promo {
    padding: 14px;
  }

  /* FAQ */
  .faq-title {
    font-size: 1.3rem;
  }
  .faq-q h4 {
    font-size: 0.95rem;
  }
  .faq-a {
    padding-left: 14px;
    font-size: 0.85rem;
  }

  /* Admin levels grid */
  .levels-checkbox-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .editor-toolbar {
    padding: 4px 6px !important;
  }
  .toolbar-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 4px !important;
    font-size: 0.72rem !important;
  }
  .toolbar-sep {
    height: 18px !important;
  }

  /* Rich HTML render */
  .qa-html-render {
    font-size: 0.9rem;
  }
  .qa-html-render h2 {
    font-size: 1.05rem;
  }
  .qa-rich-content {
    padding: 12px 14px 10px;
  }

  /* Promo section */
  .promo-header {
    flex-direction: column;
    gap: 8px;
  }
}

/* ===== TINY MOBILE: 360px ===== */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.3rem;
  }
  .nav-btn {
    padding: 7px;
  }
  .courses-grid {
    gap: 12px;
  }
  /* Support cards row inherits swipable styling */
  .support-tab-card {
    padding: 10px;
  }
  .tab-card-title-en,
  .tab-card-title-ur {
    font-size: 0.72rem;
  }
  .filter-tab {
    padding: 5px 9px;
    font-size: 0.74rem;
  }
  .admin-tab-btn span:not(.tab-badge) {
    display: none !important;
  }
}


/* ----------------------------------------------------
   13. STUDENT SUPPORT CORNER SPECIFIC STYLING
   ---------------------------------------------------- */
.support-corner-section {
  max-width: 1400px;
  margin: 40px auto 10px auto;
  padding: 0 24px;
}

.support-corner-container {
  background-color: var(--white);
  border-radius: 20px;
  border: 1px solid var(--slate-200);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.support-corner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.support-header-left {
  flex: 1;
}

.support-mini-badge {
  background-color: rgba(5, 150, 105, 0.08);
  color: var(--emerald-700);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.support-mini-badge i {
  width: 12px;
  height: 12px;
}

.support-main-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.support-title-icon {
  color: var(--emerald-600);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.lang-separator {
  color: var(--slate-300);
  font-weight: 300;
  margin: 0 4px;
}

.support-subtitle {
  font-size: 0.88rem;
  color: var(--slate-500);
  margin-top: 6px;
  line-height: 1.5;
}

/* Language selector buttons pill group */
.support-header-right {
  flex-shrink: 0;
}

.lang-switch-group {
  display: flex;
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 4px;
  border-radius: 30px;
}

.lang-switch-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-600);
  border-radius: 20px;
  transition: var(--transition-smooth);
  border: none;
}

.lang-switch-btn:hover {
  color: var(--slate-900);
}

.lang-switch-btn.active {
  background-color: var(--slate-900);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* 4 Tab Cards Grid Row */
.support-tabs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.support-tab-card {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: var(--transition-card);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.support-tab-card:hover {
  transform: translateY(-2px);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-md);
}

.support-tab-card.active {
  border: 2.5px solid var(--slate-900);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  position: relative;
}

.support-tab-card.active::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.tab-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.tab-card-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tab-card-icon-wrapper i {
  width: 18px;
  height: 18px;
}

.tab-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Color scheme variants */
.green-icon { background-color: rgba(5, 150, 105, 0.08); color: var(--emerald-700); }
.green-badge { border: 1px solid rgba(5, 150, 105, 0.2); color: var(--emerald-700); }

.blue-icon { background-color: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.blue-badge { border: 1px solid rgba(59, 130, 246, 0.2); color: #3b82f6; }

.purple-icon { background-color: rgba(168, 85, 247, 0.08); color: #a855f7; }
.purple-badge { border: 1px solid rgba(168, 85, 247, 0.2); color: #a855f7; }

.orange-icon { background-color: rgba(249, 115, 22, 0.08); color: #f97316; }
.orange-badge { border: 1px solid rgba(249, 115, 22, 0.2); color: #f97316; }

.tab-card-title-en {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}

.tab-card-title-ur {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-top: 6px;
  letter-spacing: 0.2px;
}

/* Details Panel with Cream Hue matching image */
.support-details-panel {
  background-color: var(--white); /* Professional clean white background (Screenshot 2 Match) */
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  padding: 24px;
  animation: support-fade-in 0.35s ease;
  box-shadow: var(--shadow-sm);
}

@keyframes support-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.support-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

/* Left panel content styles */
.support-details-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-details-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-details-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

.support-details-title-row h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
}

.support-details-title-row p.ur-title {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-top: 2px;
  font-weight: 600;
}

/* Schedules container white box style */
.support-status-box {
  background-color: #f8fafc; /* Slate-50 background for clean unified panel styling (Screenshot 2 Match) */
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 16px;
}

.status-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--slate-700);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.status-box-header i {
  width: 14px;
  height: 14px;
  color: var(--slate-500);
}

.status-box-desc {
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.4;
}

/* Specifications horizontal table */
.support-specs-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

.support-spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 8px;
  align-items: start;
}

.support-spec-row:last-child {
  border-bottom: none;
}

.spec-key {
  font-weight: 700;
  color: var(--slate-500);
}

.spec-val {
  font-weight: 600;
  color: var(--slate-800);
}

/* Right panel content styles */
.support-details-right {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.support-details-right h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--slate-100);
  padding-bottom: 8px;
}

.support-guidelines-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.support-guidelines-list li {
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.5;
  padding-left: 24px;
  position: relative;
}

.support-guidelines-list li::before {
  content: "◀";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--white);
  background-color: #3b82f6; /* Blue background square (Screenshot 2 Match) */
  width: 14px;
  height: 14px;
  border-radius: 3px;
  position: absolute;
  left: 0;
  top: 4px;
}

.en-guidelines-card {
  background-color: #fefcf0; /* Light yellow background */
  border: 1px solid #fef08a; /* Yellow border */
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.en-guidelines-card h5 {
  color: #854d0e !important; /* Dark gold/yellow text */
  border-bottom: 1.5px solid #fef08a !important;
  padding-bottom: 6px;
  margin-bottom: 10px;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  margin-top: 0 !important;
}

.support-en-guidelines-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
  margin: 0;
}

.support-en-guidelines-list li {
  font-size: 0.82rem;
  color: #713f12; /* Golden brown text */
  line-height: 1.4;
  padding-left: 18px;
  position: relative;
}

.support-en-guidelines-list li::before {
  content: "•";
  color: #ca8a04; /* Gold bullet */
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: -2px;
}

/* Floating call/assist button bottom right */
.support-cta-container {
  margin-top: auto;
  align-self: flex-end;
}

.support-details-btn {
  background-color: var(--emerald-950);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.support-details-btn:hover {
  background-color: var(--emerald-850);
  transform: translateY(-1px);
}

.support-details-btn i {
  width: 14px;
  height: 14px;
}

/* Responsiveness adjustments for updates section */
@media (max-width: 992px) {
  .support-tabs-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .support-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .support-tabs-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .support-corner-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .support-header-right {
    margin-top: 10px;
  }
  
  .lang-switch-group {
    width: 100%;
    justify-content: center;
  }
}

/* ----------------------------------------------------
   14. GET WRITTEN COPY FOOTER SELECTORS
   ---------------------------------------------------- */
.qa-written-copy-footer {
  margin-top: 14px;
  width: 100%;
}

.written-copy-divider {
  border-top: 1px dashed var(--slate-300);
  margin: 14px 0 10px 0;
  width: 100%;
}

.written-copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.written-copy-left-text {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--slate-500);
  font-weight: 500;
}

.written-copy-btn {
  color: var(--emerald-600);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.written-copy-btn:hover {
  color: var(--emerald-800);
  transform: translateX(2px);
}

.written-copy-btn i {
  width: 14px;
  height: 14px;
  color: var(--emerald-600);
}

/* ----------------------------------------------------
   15. REDESIGNED ADMIN MANAGER PORTAL CONTROL DASHBOARD
   ---------------------------------------------------- */
.admin-dashboard-banner {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1e293b 100%);
  color: var(--white);
  padding: 24px 30px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-left: 5px solid var(--emerald-600);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.banner-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner-badge {
  background-color: rgba(5, 150, 105, 0.15);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
}

.badge-status-dot {
  width: 7px;
  height: 7px;
  background-color: #34d399;
  border-radius: 50%;
  animation: pulse-blink 1.5s infinite;
}

.banner-status-text {
  font-size: 0.8rem;
  color: var(--slate-400);
  font-weight: 500;
}

.banner-title {
  font-size: 1.8rem;
  color: var(--white);
  font-weight: 800;
  margin-top: 4px;
}

.banner-subtitle {
  font-size: 0.9rem;
  color: var(--slate-300);
  font-weight: 400;
}

.btn-signout {
  background-color: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-signout:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  transform: translateY(-1px);
}

.btn-signout i {
  width: 16px;
  height: 16px;
}

/* Sub-panel Navigation Tabs */
.admin-nav-tabs {
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-tab-btn {
  background-color: transparent;
  color: var(--slate-600);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.admin-tab-btn:hover {
  background-color: var(--slate-200);
  color: var(--slate-800);
}

.admin-tab-btn.active {
  background-color: var(--white);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.admin-tab-btn i {
  width: 16px;
  height: 16px;
  color: inherit;
}

.tab-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.count-badge {
  background-color: var(--slate-200);
  color: var(--slate-700);
}

.admin-tab-btn.active .count-badge {
  background-color: var(--slate-100);
  color: var(--slate-850);
}

.add-badge {
  background-color: rgba(5, 150, 105, 0.15);
  color: var(--emerald-700);
}

.admin-tabs-hint {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 500;
  padding-right: 10px;
}

/* Tab contents switcher */
.admin-tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.admin-tab-content.active-content {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-card {
  background-color: var(--white);
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 12px;
}

/* Level Grid Checkboxes */
.publish-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--slate-200);
  padding-bottom: 12px;
}

.publish-card-header h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-800);
}

.btn-autofill {
  background-color: rgba(250, 204, 21, 0.1);
  color: var(--yellow-600);
  border: 1.5px solid var(--yellow-400);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-autofill:hover {
  background-color: var(--yellow-400);
  color: var(--slate-900);
}

.publish-section {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.title-left {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-right {
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--emerald-600);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 4px;
}

.levels-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.level-select-card {
  border: 1.5px solid var(--slate-300);
  background-color: var(--white);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.level-select-card input[type="radio"] {
  display: none;
}

.level-select-card:hover {
  border-color: var(--slate-400);
}

.level-select-card.active {
  border-color: var(--emerald-600);
  background-color: #ecfdf5;
  color: var(--emerald-800);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.levels-notice {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 12px;
  font-style: italic;
  line-height: 1.4;
}

/* Formatting Instructions */
.formatting-instructions-banner {
  background-color: #fef8e8;
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.formatting-instructions-banner h5 {
  color: #b45309;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.formatting-instructions-banner ol {
  padding-left: 20px;
  font-size: 0.8rem;
  color: #78350f;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Editor Grid */
.assignments-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .assignments-editor-grid {
    grid-template-columns: 1fr;
  }
}

.assignment-editor-panel {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-header-row h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-size-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-400);
}

.editor-instruction {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 500;
  margin-bottom: 12px;
}

/* Toolbar & WYSIWYG area */
.editor-toolbar {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border: 2px solid var(--slate-200);
  border-bottom: none;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-height: 50px;
}

.toolbar-btn {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.toolbar-btn:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
  border-color: var(--slate-300);
}

.toolbar-btn.active {
  background-color: var(--emerald-100);
  color: var(--emerald-800);
  border-color: var(--emerald-600);
}

.toolbar-btn i {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Text-label buttons (H2, H3, ¶ P) */
.toolbar-text-btn {
  width: auto !important;
  padding: 0 10px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* Toolbar vertical separator */
.toolbar-sep {
  width: 1px;
  height: 22px;
  background-color: var(--slate-200);
  flex-shrink: 0;
  margin: 0 2px;
}

/* Yellow highlight button */
.toolbar-btn-highlight {
  background-color: #fef9c3;
  color: #a16207;
  border-color: #fde68a;
  font-size: 0.72rem;
  font-weight: 800;
}
.toolbar-btn-highlight:hover { background-color: #fef08a; }

/* Green highlight button */
.toolbar-btn-green {
  background-color: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 800;
}
.toolbar-btn-green:hover { background-color: #a7f3d0; }

/* Red text button */
.toolbar-btn-red {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
  font-size: 0.8rem;
}
.toolbar-btn-red:hover { background-color: #fee2e2; }

/* Clear / eraser button */
.toolbar-btn-clear {
  background-color: #fef2f2;
  color: var(--red-600);
  border-color: #fca5a5;
}
.toolbar-btn-clear:hover { background-color: #fca5a5; color: #b91c1c; }


/* -------------------------------------------------------
   WYSIWYG RICH TEXT EDITOR (contenteditable)
   Replaces old .assignment-editor-panel textarea
   ------------------------------------------------------- */

.wysiwyg-editor {
  width: 100%;
  min-height: 260px;
  max-height: 500px;
  overflow-y: auto;
  border: 2px solid var(--slate-200);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--slate-800);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  word-break: break-word;
}

.wysiwyg-editor:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Placeholder text shown when editor is empty */
.wysiwyg-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--slate-400);
  font-style: italic;
  pointer-events: none;
  display: block;
  white-space: pre-wrap;
}

/* Rich content inside the editor */
.wysiwyg-editor p   { margin-bottom: 0.5em; }
.wysiwyg-editor ul  { padding-left: 1.5em; margin-bottom: 0.5em; list-style: disc; }
.wysiwyg-editor ol  { padding-left: 1.5em; margin-bottom: 0.5em; list-style: decimal; }
.wysiwyg-editor li  { margin-bottom: 0.25em; }
.wysiwyg-editor h2  { font-size: 1.15rem; margin: 0.6em 0 0.3em; }
.wysiwyg-editor h3  { font-size: 1rem; margin: 0.5em 0 0.25em; color: var(--emerald-800); }
.wysiwyg-editor strong { color: var(--slate-900); }
.wysiwyg-editor mark { background: #fef08a; padding: 0 2px; border-radius: 2px; }

/* Char count badge */
.editor-char-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-400);
  background: var(--slate-100);
  padding: 3px 8px;
  border-radius: 20px;
  transition: color 0.2s;
}


.publish-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1.5px solid var(--slate-200);
  padding-top: 20px;
  margin-top: 20px;
}

.btn-cancel-publish {
  background-color: var(--white);
  color: var(--slate-700);
  border: 1.5px solid var(--slate-200);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-cancel-publish:hover {
  background-color: var(--slate-50);
  color: var(--slate-900);
}

.btn-save-publish {
  background-color: var(--emerald-600);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-save-publish:hover {
  background-color: var(--emerald-700);
  transform: translateY(-1px);
}

.margin-top-10 { margin-top: 10px; }
.margin-top-20 { margin-top: 20px; }

/* ============================================================
   QA HTML RENDER — Rich formatted content from admin editor
   ============================================================ */

/* Rich HTML display area — same as Word/AI paste output */
.qa-html-render {
  font-size: 0.97rem;
  color: var(--slate-700);
  line-height: 1.75;
  font-family: var(--font-body);
}

/* Headings inside rich content */
.qa-html-render h1,
.qa-html-render h2,
.qa-html-render h3,
.qa-html-render h4,
.qa-html-render h5 {
  font-family: var(--font-heading);
  color: var(--emerald-800);
  margin: 0.8em 0 0.4em;
  font-weight: 700;
  line-height: 1.3;
}
.qa-html-render h2 { font-size: 1.2rem; }
.qa-html-render h3 { font-size: 1.05rem; }
.qa-html-render h4 { font-size: 0.98rem; }

/* Paragraphs */
.qa-html-render p {
  margin: 0.45em 0 0.6em;
}

/* Bold */
.qa-html-render strong,
.qa-html-render b {
  color: var(--slate-900);
  font-weight: 700;
}

/* Italic */
.qa-html-render em,
.qa-html-render i {
  font-style: italic;
  color: var(--slate-600);
}

/* Underline */
.qa-html-render u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lists — bullet and numbered */
.qa-html-render ul {
  padding-left: 1.6em;
  margin: 0.5em 0 0.8em;
  list-style: disc;
}
.qa-html-render ol {
  padding-left: 1.6em;
  margin: 0.5em 0 0.8em;
  list-style: decimal;
}
.qa-html-render li {
  margin-bottom: 0.3em;
  line-height: 1.65;
}

/* Highlights */
.qa-html-render mark,
.qa-html-render [style*="background-color"] {
  border-radius: 3px;
  padding: 0 2px;
}

/* Red / colored text from admin */
.qa-html-render [style*="color"] {
  /* Preserve inline colors exactly */
}

/* Dividers */
.qa-html-render hr {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: 1em 0;
}

/* Rich content block wrapper */
.qa-rich-content {
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--slate-200);
  padding: 18px 20px 14px;
  margin-top: 6px;
}

/* Tables inside rich HTML content */
.qa-html-render table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  display: block;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
}

.qa-html-render th,
.qa-html-render td {
  border: 1px solid var(--slate-200);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.92rem;
  min-width: 80px;
}

.qa-html-render th {
  background-color: var(--slate-100);
  font-weight: 700;
  color: var(--slate-900);
}

.qa-html-render tr:nth-child(even) {
  background-color: var(--slate-50);
}

/* Images inside rich HTML content */
.qa-html-render img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

/* Blockquotes inside rich HTML content */
.qa-html-render blockquote {
  border-left: 4px solid var(--emerald-600);
  padding: 8px 16px;
  margin: 1em 0;
  background-color: var(--slate-100);
  color: var(--slate-700);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* ============================================================
   FINAL MOBILE POLISH — Extra fixes
   ============================================================ */

/* Prevent horizontal scroll on all screens */
body {
  overflow-x: hidden;
}

/* Written copy row — stack on mobile */
@media (max-width: 600px) {
  .written-copy-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .written-copy-btn {
    align-self: flex-end;
  }
  .section-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .title-right {
    align-self: flex-start;
  }
  .admin-tabs-hint {
    font-size: 0.72rem !important;
    text-align: center !important;
  }
  /* Support corner details panel */
  .support-details-panel {
    overflow-x: auto;
  }
  /* Viewer tabs on mobile */
  .viewer-tabs {
    overflow-x: auto;
  }
  /* Card header badges - keep on one line */
  .card-header-badge {
    flex-wrap: wrap;
    gap: 6px;
  }
  /* Detail meta badges row */
  .detail-meta-row {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Smooth tap highlight for mobile */
@media (hover: none) {
  .course-card:hover,
  .support-tab-card:hover,
  .assignment-btn-preview:hover {
    transform: none;
  }
  .course-card:active {
    transform: scale(0.98);
  }
  .assignment-btn-preview:active {
    background-color: var(--emerald-50);
    border-color: var(--emerald-600);
  }
}

/* ----------------------------------------------------
   16. UPGRADED ADMIN PANEL DIRECTORY & MOBILE CARDS
   ---------------------------------------------------- */

/* Directory Header Styling (Screenshot Match) */
.admin-directory-header {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1.5px solid var(--slate-100);
  padding-bottom: 16px;
}

.admin-dir-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-dir-title span.urdu-title {
  color: var(--slate-700);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-dir-title span.urdu-title i {
  width: 16px;
  height: 16px;
  color: var(--slate-500);
}

.admin-dir-subtitle {
  font-size: 0.82rem;
  color: var(--slate-500);
  line-height: 1.4;
  margin: 0;
}

.admin-dir-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.admin-active-badge {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 30px;
  border: 1px solid rgba(5, 150, 105, 0.15);
}

/* Desktop cards wrapper hides by default */
.admin-courses-cards-wrapper {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* Mobile responsive media overrides */
@media (max-width: 768px) {
  .admin-courses-table-wrapper {
    display: none !important; /* Hide squished desktop table */
  }
  .admin-courses-cards-wrapper {
    display: flex !important; /* Show premium card list */
  }
  .admin-directory-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 12px !important;
  }
  .admin-dir-title {
    font-size: 1.05rem !important;
  }
  .admin-dir-title span.urdu-title {
    font-size: 0.85rem !important;
  }
  .admin-dir-subtitle {
    font-size: 0.78rem !important;
  }
  .admin-dir-badge-row {
    margin-top: 6px !important;
  }
}

/* Premium Mobile Card Layout (Screenshot Match) */
.admin-course-mobile-card {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.admin-course-mobile-card:hover {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-md);
}

.admin-mobile-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 12px;
  text-align: left;
}

.admin-mobile-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-mobile-code-badge {
  background-color: var(--slate-900);
  color: var(--yellow-400);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-heading);
}

.admin-mobile-level-badge {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.admin-mobile-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.35;
  margin: 0;
}

.admin-mobile-card-semester {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 500;
}

.admin-mobile-card-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.admin-mobile-btn-edit,
.admin-mobile-btn-delete {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.admin-mobile-btn-edit {
  color: var(--emerald-600);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.admin-mobile-btn-edit:hover {
  background-color: rgba(5, 150, 105, 0.08);
  transform: translateY(-1px);
}

.admin-mobile-btn-delete {
  color: var(--red-600);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.admin-mobile-btn-delete:hover {
  background-color: rgba(220, 38, 38, 0.08);
  transform: translateY(-1px);
}
