@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&display=swap');

/* 
  Zazele Online - Unified Design System
  Theme: Professional App Shell
*/

:root {
  --primary: #007AFF; /* Electric Blue */
  --primary-dark: #0056B3;
  --secondary: #1A2B49; /* Deep Navy */
  --bg-body: #F4F7F9; /* Light Cool Gray */
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-secondary: #EDF2F7; /* Cool sand */
  
  --success: #34C759; /* iOS Green */
  --danger: #FF3B30; /* iOS Red */
  
  --text-main: #1D1D1F; /* Off-black */
  --text-soft: #424245; /* Slate Gray */
  --text-muted: #86868B;
  --text-on-secondary: #FFFFFF;
  
  --border-color: #E5E5E7;
  --shadow-soft: 0 8px 32px rgba(26, 43, 73, 0.04);
  --shadow-medium: 0 16px 48px rgba(26, 43, 73, 0.08);
  
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --app-width: 1100px;
  --header-height: 80px;
  --bg-footer: #1A2B49; /* Deep Navy Footer */
}

/* Dark Mode Variables */
.dark-mode {
  --bg-body: #0F172A; /* Dark Slate Navy */
  --bg-card: #1E293B;
  --bg-input: #1E293B;
  --bg-secondary: #334155;
  
  --text-main: #F8FAFC;
  --text-soft: #CBD5E1;
  --text-muted: #94A3B8;
  --text-on-secondary: #FFFFFF;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 16px 48px rgba(0, 0, 0, 0.5);
  --secondary: #38BDF8; /* Sky Blue Hover in dark mode */
  --bg-footer: #0B0F19;
}

.dark-mode .app-header {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
}

.dark-mode .module-progress-card,
.dark-mode .module-select-card,
.dark-mode .accordion-item,
.dark-mode .doc-card,
.dark-mode .portal-form-box,
.dark-mode .modal-content,
.dark-mode .notification-dropdown,
.dark-mode .score-card,
.dark-mode .review-item,
.dark-mode .module-item,
.dark-mode .module-sections,
.dark-mode .module-item-header,
.dark-mode .quiz-wrapper,
.dark-mode .review-wrapper,
.dark-mode #profile-menu {
  background: var(--bg-card);
  border-color: var(--border-color);
}

.dark-mode .users-table th {
  background: var(--bg-secondary);
}

.dark-mode .users-table tr:hover {
  background: var(--bg-input);
}

.dark-mode .notification-item:hover {
  background: var(--bg-secondary);
}

.dark-mode .status-summary,
.dark-mode .action-box,
.dark-mode .lesson-item-admin,
.dark-mode .quiz-progress,
.dark-mode .quiz-navigation,
.dark-mode .question-indicators,
.dark-mode .resource-item,
.dark-mode .support-req-item,
.dark-mode .quiz-placeholder-item,
.dark-mode .results-score .score-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.dark-mode input, 
.dark-mode select, 
.dark-mode textarea {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--border-color);
}

.dark-mode .portal-tabs {
  background: var(--bg-secondary);
}

.dark-mode .portal-tab.active {
  background: var(--bg-card);
  color: var(--primary);
}

.dark-mode .school-brand {
  color: #FFFFFF;
}

.dark-mode .btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-main);
}

.dark-mode .notification-header,
.dark-mode .notification-item,
.dark-mode .tabs-header,
.dark-mode .module-item-header,
.dark-mode .module-sections,
.dark-mode .admin-nav-bar,
.dark-mode .review-header {
  border-color: var(--border-color);
}

.dark-mode .quiz-header {
  background: #1A2B49; /* Keep header dark navy but distinct */
}

/* Dark Mode Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--secondary);
}

.theme-toggle:hover {
  background: rgba(0, 122, 255, 0.1);
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
}

@media (max-width: 900px) {
  .main-nav { display: none; } /* Simplified for now, can be mobile menu later */
}

/* Hero Enhancements */
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Pillar Overview */
.pillar-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: -100px;
  margin-bottom: 80px;
  position: relative;
  z-index: 10;
}

.pillar-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-10px);
}

.pillar-card h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.pillar-card p {
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .pillar-overview {
    grid-template-columns: 1fr;
    margin-top: -50px;
  }
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-soft);
}

/* Web Dev Packages */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  width: 100%;
  justify-items: center;
}

.package-card {
  background: var(--bg-card);
  padding: 48px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 340px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.package-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-medium), 0 20px 40px rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
}

.package-card.featured {
  border-color: var(--primary);
  box-shadow: 0 20px 50px -10px rgba(0, 122, 255, 0.2);
  transform: scale(1.05) translateY(-5px);
  z-index: 2;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}
.package-card.featured:hover {
  transform: scale(1.05) translateY(-14px);
  box-shadow: 0 30px 60px -15px rgba(0, 122, 255, 0.35);
}

.package-badge {
  display: inline-flex;
  align-self: flex-start;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
  margin-bottom: 16px;
}

.package-card h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--secondary);
}

.package-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.package-best-for {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.package-card p {
  color: var(--text-soft);
  margin-bottom: 32px;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Dark Mode Overrides for new elements */
.dark-mode .pillar-card,
.dark-mode .package-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

.dark-mode .main-nav a {
  color: var(--text-soft);
}

.dark-mode .main-nav a:hover {
  color: var(--primary);
}

/* Base Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .school-brand {
  font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar for modern look */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Premium Focus ring on inputs */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
}

/* Glassmorphism class for premium look */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.dark-mode .glass-panel {
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Page Visibility Logic - CRITICAL */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page { 
  display: none !important; 
  opacity: 0; 
}
.page.active { 
  display: block !important; 
  flex: 1;
  animation: pageFadeIn 0.4s forwards; 
}

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

/* Footer Styling */
.app-footer {
  background: var(--bg-footer);
  color: #ffffff;
  padding: 80px 0 40px 0;
  margin-top: 100px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hide footer when dashboards, pending-page, or assignment-page are active */
#app:has(#dashboard-page.active) .app-footer,
#app:has(#admin-page.active) .app-footer,
#app:has(#pending-page.active) .app-footer,
#app:has(#assignment-page.active) .app-footer {
    display: none !important;
}

/* Landing Page Specifics */
.landing-main {
  padding-bottom: 80px;
}

.hero-section {
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(26, 43, 73, 0.2) 0%, transparent 50%),
              var(--bg-footer);
  color: white;
  padding: 140px 40px;
  text-align: center;
  margin-bottom: 80px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.3);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

#webdev-home.hero-section {
  background: radial-gradient(circle at 10% 20%, rgba(26, 43, 73, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(0, 122, 255, 0.1) 0%, transparent 50%),
              var(--bg-footer);
}

.hero-section .btn-primary {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.hero-section .btn-primary:hover {
  background: var(--bg-secondary);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.hero-section .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 3.4rem;
  margin-bottom: 24px;
  line-height: 1.15;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-lead {
  font-size: 1.35rem;
  opacity: 0.85;
  margin-bottom: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 500;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 40px;
  align-items: start;
  max-width: 1200px !important;
}

.course-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.course-features li {
  padding-left: 24px;
  position: relative;
  font-size: 0.95rem;
}

.course-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

@media (max-width: 1024px) {
  .landing-grid {
    grid-template-columns: 1fr;
    max-width: 700px !important;
    padding: 0 20px;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-stats {
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .course-features {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 60px 20px;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
}

.facebook-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: var(--transition);
}

.facebook-link:hover {
  background: #1877F2;
  transform: translateY(-2px);
}

/* --- Universal App Shell --- */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(252, 250, 246, 0.85) !important; /* Matches warm bg */
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.dark-mode .app-header {
  background: rgba(21, 18, 20, 0.85) !important; /* Dark warm */
}
.app-header .header-content {
  max-width: var(--app-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.app-container {
  max-width: var(--app-width);
  margin: 40px auto;
  padding: 0 24px;
}

.app-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

/* Typography */
h1, h2, h3 { font-weight: 800; color: var(--secondary); margin-bottom: 1rem; letter-spacing: -0.02em; }
.section-title { font-size: 1.6rem; margin-bottom: 36px; display: flex; align-items: center; gap: 15px; color: var(--secondary); font-weight: 800; letter-spacing: -0.02em; }

/* Global Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  letter-spacing: -0.01em;
  gap: 8px;
}
.btn-primary { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: white; 
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.35); 
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary { 
  background: var(--bg-card); 
  color: var(--text-main); 
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(22, 25, 46, 0.02);
}
.btn-secondary:hover { 
  background: var(--bg-secondary); 
  transform: translateY(-1px); 
  box-shadow: 0 4px 12px rgba(22, 25, 46, 0.04);
}
.btn-secondary:active {
  transform: translateY(0);
}
.btn-danger { 
  background: var(--danger); 
  color: white; 
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}
.btn-danger:hover { 
  transform: translateY(-1px); 
  filter: brightness(0.95); 
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.3);
}
.btn-danger:active {
  transform: translateY(0);
}
.btn-success { 
  background: var(--success); 
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}
.btn-success:hover { 
  transform: translateY(-1px); 
  filter: brightness(0.95); 
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}
.btn-success:active {
  transform: translateY(0);
}
.btn-small { padding: 8px 16px; font-size: 0.8rem; border-radius: 8px; }
.btn-large { padding: 16px 32px; font-size: 1rem; border-radius: 14px; }

/* Header Content */
.header-content {
  width: 100%;
  max-width: var(--app-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.school-brand span span {
  background: linear-gradient(135deg, var(--primary) 0%, #00C6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.user-nav { display: flex; align-items: center; gap: 24px; }

/* Notification System */
.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-btn:hover {
  background: rgba(0, 122, 255, 0.05);
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  margin-top: 12px;
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

.notification-dropdown.active {
  display: flex;
}

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

.notification-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--secondary);
}

.mark-all-read {
  font-size: 0.75rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--text-main);
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  background: rgba(0, 122, 255, 0.03);
  border-left: 3px solid var(--primary);
}

.notification-item .message {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.notification-item .time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.no-notifications {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.user-info-text { text-align: right; }
.user-info-text .name { display: block; font-weight: 700; font-size: 0.9rem; color: var(--secondary); }
.user-info-text .role { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

/* --- Student Portal --- */

.progress-section-card { padding: 0; margin-bottom: 40px; border: none; background: transparent; box-shadow: none; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

.module-progress-card { 
    background: var(--bg-card); 
    padding: 24px; 
    border-radius: 20px; 
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.module-progress-card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-medium);
    border-color: rgba(0, 122, 255, 0.2);
}

.module-name-compact { 
    font-size: 1rem; 
    font-weight: 800; 
    color: var(--secondary); 
    margin: 0; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    letter-spacing: -0.01em;
}

.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.progress-percentage { font-size: 0.9rem; font-weight: 800; color: var(--primary); }

.progress-bar-container { 
  background: var(--bg-secondary); 
  height: 8px; 
  border-radius: 100px; 
  overflow: hidden; 
  margin-bottom: 14px; 
  border: 1px solid var(--border-color);
}
.progress-fill { 
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%); 
  height: 100%; 
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.progress-meta-compact { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.progress-meta-compact strong { color: var(--text-main); }

/* Module Selector Grid */
.module-selector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.module-select-card { 
    background: var(--bg-card); 
    padding: 36px; 
    border-radius: 24px; 
    border: 1px solid var(--border-color);
    cursor: pointer; 
    transition: var(--transition); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.module-select-card:hover { 
    border-color: var(--primary); 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-medium), 0 16px 30px rgba(0, 122, 255, 0.1); 
}
.module-select-card h3 { font-size: 1.3rem; margin-bottom: 14px; color: var(--secondary); font-weight: 800; letter-spacing: -0.02em; }
.module-select-card p { font-size: 0.9rem; color: var(--text-soft); margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }

/* Support Requests UI */
.support-req-item { 
    padding: 20px; 
    background: var(--bg-secondary); 
    border-radius: 16px; 
    border-left: 4px solid var(--primary); 
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}
.support-req-item.scheduled { 
    border-left-color: var(--success); 
    background: rgba(40, 167, 69, 0.06); 
}
.support-req-item h5 { margin: 0 0 6px 0; font-size: 1rem; color: var(--secondary); font-weight: 800; }
.support-req-item .meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.support-req-item .link-box { margin-top: 14px; padding: 12px 16px; background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border-color); }

/* Accordion */
.accordion-item { 
    background: var(--bg-card); 
    border-radius: 20px; 
    border: 1px solid var(--border-color); 
    margin-bottom: 20px; 
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.accordion-header { 
    width: 100%; 
    padding: 24px 32px; 
    background: none; 
    border: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    text-align: left; 
    transition: var(--transition);
}
.accordion-header:hover {
    background: var(--bg-secondary);
}
.accordion-title { font-weight: 800; color: var(--secondary); font-size: 1.25rem; letter-spacing: -0.01em; }
.accordion-content { display: none; padding: 0 32px 32px 32px; }
.accordion-content.active { display: block; }

/* Lesson Items */
.lesson-item { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border-color); }
.lesson-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.lesson-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.lesson-number { font-weight: 900; color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; }
.lesson-title { font-weight: 800; font-size: 1.35rem; color: var(--secondary); letter-spacing: -0.015em; }

.lesson-video-container { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 16/9; 
    background: #000; 
    border-radius: 16px; 
    overflow: hidden; 
    margin-bottom: 24px; 
    box-shadow: var(--shadow-medium);
}
.lesson-video-container iframe { width: 100%; height: 100%; border: none; }
.lesson-description { color: var(--text-soft); margin-bottom: 24px; font-size: 1rem; line-height: 1.6; }

/* Video Overlay for Locked Lessons */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 20, 38, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: white;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.lock-icon {
  font-size: 3.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.unlock-date {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 18px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Locked Module Card */
.module-select-card.locked {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.6);
  position: relative;
}

.module-select-card.locked:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: var(--shadow-soft);
}

.module-select-card.locked::after {
  content: '🔒 Locked';
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-select-card.locked .btn {
  background: var(--text-muted);
  pointer-events: none;
}

.lesson-resources { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-color); }

/* Quiz Placeholder */
.quiz-placeholder-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 16px 20px; 
    background: var(--bg-secondary); 
    border: 1px dashed var(--border-color); 
    border-radius: 12px; 
}
.placeholder-label { font-weight: 800; font-size: 0.85rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.5px; }
.placeholder-text { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

/* --- Admin Portal --- */

/* Modal base styling */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  -webkit-overflow-scrolling: touch;
}
.modal.active { display: flex; }
.modal .modal-content {
  max-height: 90vh;
  overflow: auto;
  position: relative;
  z-index: 2001; /* ensure modal content sits above sticky header */
  width: 90%;
  min-width: 320px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.modal .modal-content .btn { min-width: 72px; }


.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}

.admin-nav-bar { 
  display: flex; 
  gap: 24px; 
  margin-bottom: 40px; 
  border-bottom: 1px solid var(--border-color); 
  overflow-x: auto;
  padding-bottom: 4px;
}
.admin-nav-item { 
  padding: 16px 0; 
  background: none; 
  border: none; 
  font-weight: 700; 
  color: var(--text-muted); 
  cursor: pointer; 
  border-bottom: 3px solid transparent; 
  transition: var(--transition); 
  text-transform: uppercase; 
  font-size: 0.8rem; 
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.admin-nav-item.active { 
  color: var(--primary); 
  border-bottom-color: var(--primary); 
}

/* Modules Management Accordion */
.modules-management-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.module-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}

.module-item-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
}

.module-item-header:hover {
  background: var(--bg-secondary);
}

.module-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.toggle-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.toggle-icon::before {
  content: "▼";
  font-size: 0.7rem;
  color: var(--text-muted);
}

.module-item.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.module-item.collapsed .module-sections {
  display: none;
}

.module-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  font-weight: 500;
}

.module-item-actions {
  display: flex;
  gap: 12px;
}

.module-sections {
  padding: 32px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.lessons-section h4, .assignment-section-admin h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 800;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.lesson-item-admin {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.lesson-info p {
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}

.video-indicator, .notes-indicator {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.lesson-actions {
  display: flex;
  gap: 8px;
}

.btn-tiny {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.assignment-section-admin {
  padding-left: 40px;
  border-left: 1px solid var(--border-color);
}

.admin-detail-grid { display: grid; grid-template-columns: 1fr 350px; gap: 32px; align-items: start; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.info-item label { display: block; font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.info-item p { font-size: 1.05rem; font-weight: 700; color: var(--secondary); }

.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.doc-card { padding: 24px; background: var(--bg-secondary); border-radius: 16px; border: 1px solid var(--border-color); }
.doc-card label { display: block; font-size: 0.85rem; font-weight: 800; margin-bottom: 16px; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.status-summary { background: var(--bg-secondary); padding: 24px; border-radius: 16px; margin-bottom: 24px; border: 1px solid var(--border-color); }
.status-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.9rem; color: var(--text-main); font-weight: 600; }
.status-item:last-child { margin-bottom: 0; }

.action-box { margin-bottom: 20px; padding: 20px; border-radius: 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); }
.action-box.highlight { background: rgba(0, 122, 255, 0.05); border-color: rgba(0, 122, 255, 0.2); }
.action-box.highlight-success { background: rgba(40, 167, 69, 0.05); border-color: rgba(40, 167, 69, 0.2); }
.action-hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 500; }

/* Tables */
.users-table, .admin-table { 
  width: 100%; 
  border-collapse: separate; 
  border-spacing: 0; 
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.users-table th, .admin-table th { 
  text-align: left; 
  padding: 16px 20px; 
  background: var(--bg-secondary); 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  color: var(--text-muted); 
  border-bottom: 1px solid var(--border-color); 
  font-weight: 800;
  letter-spacing: 0.5px;
}
.users-table td, .admin-table td { 
  padding: 16px 20px; 
  border-bottom: 1px solid var(--border-color); 
  font-size: 0.9rem; 
  color: var(--text-main); 
  font-weight: 500;
}
.users-table tr:last-child td, .admin-table tr:last-child td {
  border-bottom: none;
}
.users-table tr:hover, .admin-table tr:hover { 
  background: var(--bg-secondary); 
  cursor: pointer; 
}

/* Status Labels */
.status { 
  padding: 6px 12px; 
  border-radius: 8px; 
  font-size: 0.75rem; 
  font-weight: 700; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.status.approved { background: rgba(40, 167, 69, 0.1); color: var(--success); }
.status.pending { background: rgba(255, 193, 7, 0.1); color: hsl(45, 100%, 35%); }
.status.completed { background: rgba(40, 167, 69, 0.1); color: var(--success); }

.status-pill { 
  padding: 6px 14px; 
  border-radius: 100px; 
  font-size: 0.7rem; 
  font-weight: 800; 
  text-transform: uppercase; 
  letter-spacing: 0.5px;
  display: inline-block;
}
.status-pill.success { background: rgba(40, 167, 69, 0.1); color: var(--success); }
.status-pill.pending { background: rgba(255, 193, 7, 0.1); color: hsl(45, 100%, 35%); }
.status-pill.completed { background: rgba(40, 167, 69, 0.1); color: var(--success); }

/* Quiz & Assignment UI */
.quiz-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  overflow: hidden;
}

.quiz-header {
  padding: 40px;
  background: #1A2B49;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-header h2 { color: white; margin-bottom: 8px; }
.timer-display { font-size: 2.5rem; font-weight: 800; font-family: monospace; color: white; }

.quiz-progress {
  padding: 24px 40px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.quiz-content {
  padding: 60px 40px;
  min-height: 400px;
  background: var(--bg-card);
}

.quiz-question {
  animation: fadeIn 0.3s ease;
}

.question-meta {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
}

.question-number {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.question-text {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 40px;
  color: var(--secondary);
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
}

.option-label:hover {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.02);
}

.option-label input[type="radio"] {
  display: none;
}

.option-label input[type="radio"]:checked + .option-letter {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.option-label input[type="radio"]:checked ~ .option-text {
  color: var(--primary);
  font-weight: 600;
}

.option-letter {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  margin-right: 20px;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
  color: var(--text-main);
}

.quiz-navigation {
  padding: 32px 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

.question-indicators {
  padding: 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: var(--bg-card);
}

.question-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.question-dot.active { background: var(--primary); transform: scale(1.3); }
.question-dot.answered { background: var(--success); }

/* Results */
.results-header { padding: 60px 40px; text-align: center; }
.results-header.passed { background: rgba(52, 199, 89, 0.1); color: var(--success); }
.results-header.failed { background: rgba(255, 59, 48, 0.1); color: var(--danger); }

.results-score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px;
  background: var(--bg-card);
}

.score-card {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  color: var(--text-main);
}

.score-number { display: block; font-size: 2rem; font-weight: 800; margin-bottom: 8px; color: var(--secondary); }
.score-percentage { font-weight: 700; color: var(--primary); }

/* Review UI */
.review-wrapper { max-width: 900px; margin: 0 auto; background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow-medium); }
.review-header { padding: 40px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); color: var(--secondary); }
.review-list { padding: 40px; display: flex; flex-direction: column; gap: 40px; background: var(--bg-card); }

.review-item { padding: 32px; border-radius: 16px; border: 1px solid var(--border-color); position: relative; background: var(--bg-card); }
.review-item.correct { border-left: 6px solid var(--success); }
.review-item.incorrect { border-left: 6px solid var(--danger); }

.review-q-meta { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.q-num { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); }
.q-status { font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 100px; }
.correct .q-status { background: rgba(52, 199, 89, 0.1); color: var(--success); }
.incorrect .q-status { background: rgba(255, 59, 48, 0.1); color: var(--danger); }

.review-q-text { font-size: 1.25rem; margin-bottom: 24px; color: var(--secondary); }
.review-options { display: flex; flex-direction: column; gap: 12px; }

.review-opt { display: flex; align-items: center; padding: 16px 20px; border: 1px solid var(--border-color); border-radius: 10px; font-size: 0.95rem; color: var(--text-main); }
.review-opt.correct-option { border-color: var(--success); background: rgba(52, 199, 89, 0.1); font-weight: 600; }
.review-opt.wrong-option { border-color: var(--danger); background: rgba(255, 59, 48, 0.1); }

.opt-key { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: 50%; margin-right: 16px; font-weight: 700; font-size: 0.8rem; }
.correct-option .opt-key { background: var(--success); color: white; border-color: var(--success); }
.wrong-option .opt-key { background: var(--danger); color: white; border-color: var(--danger); }

.opt-badge { margin-left: auto; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 4px; }
.correct-option .opt-badge { background: rgba(0, 102, 68, 0.1); color: #006644; }
.wrong-option .opt-badge { background: rgba(211, 47, 47, 0.1); color: #D32F2F; }

/* Forms */
.portal-form-box { 
    background: var(--bg-card); 
    padding: 56px 48px; 
    border-radius: 28px; 
    box-shadow: var(--shadow-medium); 
    border: 1px solid var(--border-color); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.portal-tabs { 
    display: flex; 
    background: var(--bg-secondary); 
    padding: 6px; 
    border-radius: 14px; 
    margin-bottom: 36px; 
    border: 1px solid var(--border-color);
}
.portal-tab { 
    flex: 1; 
    padding: 12px; 
    border: none; 
    border-radius: 10px; 
    background: none; 
    font-weight: 700; 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: var(--transition);
}
.portal-tab.active { 
    background: var(--bg-card); 
    color: var(--primary); 
    box-shadow: var(--shadow-soft); 
}

.form { display: none; }
.form.active { display: block; }

.form-group { margin-bottom: 24px; }
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 800; 
    font-size: 0.8rem; 
    color: var(--text-soft); 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea { 
  width: 100%; 
  padding: 14px 16px; 
  border: 1px solid var(--border-color); 
  border-radius: 12px; 
  font-size: 0.95rem; 
  background: var(--bg-input); 
  color: var(--text-main); 
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

/* Password Toggle */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.25rem;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* Modals */
.modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(13, 20, 38, 0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center; 
    justify-content: center; 
    z-index: 2000; 
    padding: 24px; 
}
.modal.active { display: flex; }
.modal-content { 
    background: var(--bg-card); 
    border-radius: 24px; 
    padding: 40px; 
    width: 100%; 
    box-shadow: var(--shadow-medium), 0 24px 60px rgba(0, 0, 0, 0.15); 
    color: var(--text-main); 
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.modal-content h3, .modal-content h2 { color: var(--secondary); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }

#profile-menu.active { display: block !important; }
#profile-menu { 
    background: var(--bg-card); 
    color: var(--text-main); 
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
#profile-menu p { color: var(--text-soft); }
#profile-menu #profile-fullname { color: var(--secondary); }

/* Module Tabs */
.module-tabs {
  margin-top: 20px;
}

.tabs-header {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
}

.module-tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.module-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.module-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.module-tab-panel.active {
  display: block;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.resource-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resource-icon {
  font-size: 1.5rem;
}

/* Error Messages */
.error-message { background: rgba(255, 59, 48, 0.1); color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; display: none; }
.error-message.show { display: block; }

/* Utility */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 992px) {
  .admin-detail-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .app-header { padding: 0 20px; }
}

/* Webinar & Event Cards */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-card {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.event-card h4 {
  margin-bottom: 8px;
  color: var(--primary);
}

.event-card .event-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}

.event-card .event-desc {
  font-size: 0.9rem;
  margin-bottom: 16px;
  color: var(--text-soft);
}

.admin-event-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
}

.admin-event-card.archived {
  border-left-color: var(--text-muted);
  opacity: 0.7;
}

.admin-event-info h4 {
  margin-bottom: 4px;
}

.admin-event-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.status-tag {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-tag.sent {
  background: #d4edda;
  color: #155724;
}

/* Module Completion Styles */
.module-completion-card {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--secondary) 0%, #2A4372 100%);
  color: white;
  border-radius: 20px;
  margin-top: 40px;
  box-shadow: var(--shadow-medium);
  animation: moduleCompletePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes moduleCompletePop {
  0% { opacity: 0; transform: scale(0.9) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.completion-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}

.module-completion-card h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 12px;
}

.remaining-summary {
  margin: 32px 0;
  padding: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: left;
}

.remaining-summary h4 {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mini-module-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-module-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.mini-module-item.completed {
  color: var(--success);
  font-weight: 600;
}

.mini-module-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.mini-module-item.completed .dot {
  background: var(--success);
}

/* Assessment Section UI Update */
.assessment-ready-card {
  background: #E3FCEF;
  border: 2px solid var(--success);
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 32px;
}

.assessment-ready-card h3 {
  color: #006644;
  margin-bottom: 12px;
}

/* Custom styles for new elements */
.pricing-card {
    border-left: 5px solid var(--primary);
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateX(5px);
}

.bank-details-box {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 2px dashed var(--primary);
}

.payment-option {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
}

/* Selection Portal / Modern Homepage Styles */
#selection-portal {
    display: none;
    min-height: 100vh;
    background: var(--bg-body);
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

#selection-portal.active {
    display: block;
}

/* Standardized brand and navbar states */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
    margin: 0;
    padding: 0;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

/* Home Main Container */
.home-main {
    padding-top: var(--header-height);
}

/* Global Home Container */
.home-container {
    max-width: var(--app-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Sections General */
.home-hero-section,
.home-mission-section,
.home-services-section,
.home-why-section,
.home-footer-section {
    padding: 120px 0;
    position: relative;
}

/* Theme Tag / Badge */
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 122, 255, 0.08); /* Blue tint */
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}
.home-badge {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(26, 43, 73, 0.1) 100%);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 122, 255, 0.12);
}

/* Hero Section */
.home-hero-section {
    min-height: calc(80vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 10% 20%, rgba(0, 122, 255, 0.05) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(26, 43, 73, 0.06) 0%, transparent 45%);
}
.home-hero-content {
    max-width: 850px;
    padding: 0 24px;
    z-index: 2;
}
.home-hero-content h1 {
    font-size: 3.6rem;
    line-height: 1.15;
    font-weight: 850;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}
.home-hero-lead {
    font-size: 1.25rem;
    color: var(--text-soft);
    line-height: 1.65;
    margin-bottom: 40px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}
.home-hero-ctas {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.06) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

/* Mission Section */
.home-mission-section {
    background: var(--bg-secondary);
}
.mission-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}
.mission-text-side h2 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.mission-text-side p {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.75;
}

/* Mission Graphic */
.dual-engine-box {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    position: relative;
}
.engine-node {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: var(--transition);
}
.engine-node:hover {
    transform: translateX(5px);
}
.node-icon {
    font-size: 2.2rem;
}
.engine-node h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text-main);
}
.engine-node p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.engine-connector {
    display: flex;
    justify-content: center;
    height: 16px;
}
.connector-line {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.6;
}

/* Services Section */
.home-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}
.home-section-header h2 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}
.home-section-header p {
    font-size: 1.15rem;
    color: var(--text-soft);
}
.services-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}
.service-compare-card {
    background: var(--bg-card);
    border-radius: 24px; /* More rounded organic feel */
    border: 1px solid var(--border-color);
    padding: 48px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.service-compare-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(26, 43, 73, 0.04), 0 0 0 1px rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.25);
}
.card-icon-large {
    font-size: 3.5rem;
    display: inline-block;
    margin-bottom: 20px;
}
.service-compare-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
}
.card-tagline {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 32px;
}
.compare-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.compare-features-list li {
    position: relative;
    padding-left: 28px;
}
.compare-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}
.compare-features-list li strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 4px;
}
.compare-features-list li span {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
    display: block;
}
.service-compare-card .card-footer .btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

/* Why Choose Us Section */
.home-why-section {
    background: var(--bg-secondary);
}
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.why-info-side h2 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.why-info-side p {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 40px;
}
.advantage-metrics {
    display: flex;
    gap: 40px;
}
.metric-box {
    display: flex;
    flex-direction: column;
}
.metric-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}
.metric-lbl {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-soft);
}

/* Code Mockup Card */
.mockup-code-card {
    background: #0f0d13; /* Warm dark bg */
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    color: #e6b8a2; /* Warm peach */
    font-family: 'Courier New', Courier, monospace;
}
.mockup-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mockup-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}
.mockup-header .dot.red { background: #d95d39; }
.mockup-header .dot.yellow { background: #f0a202; }
.mockup-header .dot.green { background: #2f9c95; }
.mockup-title {
    margin-left: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}
.mockup-code {
    padding: 24px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

/* Multi-column Footer Section */
.home-footer-section {
    background: var(--bg-footer);
    color: #ffffff;
    padding-bottom: 40px;
}
.footer-cta-card {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(26, 43, 73, 0.03) 100%);
    border-radius: var(--radius);
    padding: 60px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    margin-bottom: 80px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.footer-cta-card h2 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
}
.footer-cta-card p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 700px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}
.footer-ctas {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Footer Main Grid */
.footer-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 80px;
    text-align: left;
}
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.footer-brand span span {
    background: linear-gradient(135deg, var(--primary) 0%, #00C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-brand-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 360px;
    margin: 0;
}
.footer-social-icons {
    display: flex;
    gap: 16px;
}
.social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.social-icon-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
    border-color: var(--primary);
}
.footer-links-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 24px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.footer-links-col a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links-col a:hover {
    color: var(--primary);
    padding-left: 4px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom p {
    margin: 0;
}
.footer-legal-links {
    display: flex;
    gap: 24px;
}
.footer-legal-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: var(--transition);
}
.footer-legal-links a:hover {
    color: var(--primary);
}

/* Extra Dark Mode tweaks for home portal cards */
.dark-mode .service-compare-card {
    background: rgba(31, 26, 30, 0.45);
}

/* Hide footer when selection-portal, pending-page, or assignment-page are active */
#app:has(#selection-portal.active) .dashboard-footer,
#app:has(#pending-page.active) .dashboard-footer,
#app:has(#assignment-page.active) .dashboard-footer {
    display: none !important;
}

@media (max-width: 768px) {
    .footer-main-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}


