/* ═════════════════════════════════════════════════════════════════
   GODHULI LEARNING PORTAL - ENROLLMENT & DASHBOARD STYLES
   Designed specifically for Godhuli (গোধূলি) SSC & HSC Science Platform
   ═════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0B0E14;
  --bg-card: #151A23;
  --bg-hover: #1E2532;
  --border-color: #232B3B;
  --primary: #7C3AED;
  --primary-hover: #6D28D9;
  --primary-glow: rgba(124, 58, 237, 0.35);
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --accent-green: #10B981;
  --accent-blue: #3B82F6;
  --accent-orange: #F59E0B;
  --accent-rose: #F43F5E;
  
  --glass: rgba(21, 26, 35, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 8px 25px rgba(124, 58, 237, 0.25);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Hind Siliguri', 'Inter', system-ui, -apple-system, sans-serif;
}

/* Light Theme Variables */
body.light-theme {
  --bg-dark: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F5F9;
  --border-color: #E2E8F0;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Light theme header badge fix */
body.light-theme .header-badge {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
  color: #6D28D9;
}

body.light-theme .page-header {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(241, 245, 249, 0.9) 100%);
}

body.light-theme .page-header::before {
  background: #6D28D9;
}

body.light-theme .page-title {
  color: #0F172A;
}

body.light-theme .page-subtitle {
  color: #475569;
}

body.light-theme .header-stat .stat-count {
  color: #6D28D9;
}

body.light-theme .stat-label {
  color: #475569;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
}

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

/* ═══════════════ BACKGROUND CANVAS ═══════════════ */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 4%;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.9);
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-area img {
  height: 44px;
  width: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.logo-area div {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-area span.brand {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.logo-area span.tagline {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 3px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 600;
  background: transparent;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: 0.3s;
  border: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--bg-hover);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.kebab-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}
.kebab-btn:hover {
  background: var(--bg-hover);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  max-width: 160px;
  transition: all 0.3s ease;
}
.nav-user-chip:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.nav-user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.nav-user-chip .nav-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
  z-index: 10;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

/* ═══════════════ PAGES ═══════════════ */
.page {
  display: none;
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px 4% 60px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 80px);
}

.page.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* ═══════════════ PAGE HERO HEADER ═══════════════ */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(21, 26, 35, 0.6) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #A78BFA;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 6px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════ CONTROLS BAR ═══════════════ */
.controls-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.search-clear:hover {
  background: var(--primary);
  color: #fff;
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.custom-select {
  position: relative;
}

.select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.select-btn:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.select-btn .chevron {
  transition: transform 0.2s ease;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.custom-select.open .chevron {
  transform: rotate(180deg);
}

.select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}

.custom-select.open .select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.select-option {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.select-option:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.select-option.active {
  color: var(--text-main);
  font-weight: 600;
  background: rgba(124, 58, 237, 0.2);
}

/* ═══════════════ COURSE CARDS ═══════════════ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.15);
}

.course-card.enrolling {
  pointer-events: none;
  opacity: 0.7;
}

.course-card.enrolled-anim {
  animation: enrollPulse 0.6s ease;
}

@keyframes enrollPulse {
  0% { transform: scale(1); }
  30% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 0; }
}

.card-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #11151F;
}

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

.course-card:hover .card-thumb img {
  transform: scale(1.08);
}

.card-category {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #A78BFA;
}

.card-rating {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-popular {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Free Course Special Styles */
.course-card.free-course {
  border: 2px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.12);
  position: relative;
}

.course-card.free-course::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #10B981, #34D399, #10B981, #059669);
  background-size: 200% 100%;
  animation: shimmerFree 2s infinite linear;
  z-index: 2;
}

@keyframes shimmerFree {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.course-card.free-course:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.2);
}

.card-free-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #fff;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
  z-index: 2;
}

.enroll-btn-free {
  background: linear-gradient(135deg, #059669, #10B981) !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25) !important;
}

.enroll-btn-free:hover {
  background: linear-gradient(135deg, #047857, #059669) !important;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4) !important;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-instructor {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-instructor i {
  color: var(--primary);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 0.84rem;
  color: var(--text-muted);
}

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

.card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-green);
}

.enroll-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--primary);
  color: #ffffff;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-primary);
  margin-top: auto;
}

.enroll-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.enroll-btn:active {
  transform: translateY(0);
}

.enroll-btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.enroll-btn.loading .spinner {
  display: block;
}

.enroll-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════ NO RESULTS ═══════════════ */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--primary);
}

.no-results h3 {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* ═══════════════ DASHBOARD STATS ═══════════════ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.dash-stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.dash-stat-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dash-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.enrolled-icon { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
.progress-icon { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.completed-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.lessons-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }

.dash-stat-info {
  display: flex;
  flex-direction: column;
}

.dash-stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.dash-stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ═══════════════ DASHBOARD TABS ═══════════════ */
.dash-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  width: fit-content;
}

.dash-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  background: none;
  transition: var(--transition);
}

.dash-tab:hover {
  color: var(--text-main);
}

.dash-tab.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: var(--shadow-primary);
}

/* ═══════════════ ENROLLED CARDS ═══════════════ */
.enrolled-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.enrolled-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  animation: slideUp 0.4s ease both;
  box-shadow: var(--shadow-sm);
}

.enrolled-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.15);
}

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

.enrolled-card-top {
  display: flex;
  gap: 16px;
  padding: 22px 22px 0;
}

.enrolled-thumb {
  width: 105px;
  height: 78px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #11151F;
}

.enrolled-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.enrolled-info {
  flex: 1;
  min-width: 0;
}

.enrolled-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.enrolled-instructor {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.enrolled-date {
  color: var(--text-muted);
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-green);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 6px;
}

.enrolled-card-body {
  padding: 18px 22px 22px;
}

.progress-section {
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.progress-percent {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

body.light-theme .progress-track {
  background: rgba(0, 0, 0, 0.08);
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--primary), #9333EA);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill.complete {
  background: linear-gradient(90deg, var(--accent-green), #34D399);
}

.lesson-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lesson-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.enrolled-actions {
  display: flex;
  gap: 10px;
}

.continue-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
}

.continue-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.unenroll-btn {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.unenroll-btn:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* ═══════════════ EMPTY STATE ═══════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-illustration {
  width: 240px;
  max-width: 80%;
  margin: 0 auto 24px;
  border-radius: var(--radius-lg);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ═══════════════ COURSE DETAIL ═══════════════ */
.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 24px;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: var(--bg-hover);
}

.detail-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  position: relative;
  height: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

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

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 14, 20, 0.95) 0%, rgba(11, 14, 20, 0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.detail-hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.detail-hero-instructor {
  color: #A78BFA;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.detail-section h3 i {
  color: var(--primary);
}

.lesson-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
}

.lesson-item:hover {
  background: var(--bg-hover);
  border-color: rgba(124, 58, 237, 0.3);
}

.lesson-item.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.lesson-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  background: transparent;
  color: #fff;
  font-size: 0.75rem;
}

.lesson-item.completed .lesson-check {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.lesson-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.lesson-duration {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-sm);
}

.sidebar-progress {
  margin-bottom: 24px;
  text-align: center;
}

.sidebar-progress-ring {
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
}

.sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.sidebar-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sidebar-meta-item i {
  color: var(--primary);
  width: 18px;
  text-align: center;
}

/* ═══════════════ TOAST ═══════════════ */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.4s ease;
  min-width: 300px;
  max-width: 420px;
  position: relative;
  overflow: hidden;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.toast-icon.error { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.toast-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.toast-msg {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.toast-close {
  background: none;
  color: var(--text-muted);
  padding: 4px;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--text-main);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-green);
  animation: toastTimer 3.2s linear forwards;
}

@keyframes toastTimer {
  from { width: 100%; }
  to { width: 0; }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .detail-content {
    grid-template-columns: 1fr;
  }
  .sidebar-card {
    position: static;
  }
}

/* ═══════════════ MOBILE BOTTOM NAVIGATION BAR ═══════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(11, 14, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
}

body.light-theme .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08);
}

.mbn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
}

.mbn-item i {
  font-size: 1.15rem;
  transition: transform 0.25s ease, color 0.25s ease;
}

.mbn-item:hover,
.mbn-item.active {
  color: var(--primary);
}

.mbn-item.active i {
  transform: translateY(-2px) scale(1.15);
  color: var(--primary);
}

.mbn-item.active span {
  font-weight: 700;
  color: var(--text-main);
}

/* Mobile enrolled badge on bottom nav */
.mbn-item .mbn-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.mbn-item {
  position: relative;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .detail-content {
    grid-template-columns: 1fr;
  }
  .sidebar-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 70px;
  }

  .nav-container {
    padding: 0 12px;
  }

  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 64px;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 24px 20px;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
  }

  body.light-theme .nav-links {
    background: rgba(255, 255, 255, 0.96);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    padding: 14px 18px;
    font-size: 1.05rem;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid var(--border-color);
    width: 100%;
  }

  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
  }

  .nav-hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
  }

  .nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-hamburger.active span:nth-child(2) { opacity: 0; }
  .nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .page-title { font-size: 1.6rem; }
  .page-subtitle { font-size: 0.9rem; }

  .course-grid { 
    grid-template-columns: 1fr; 
    gap: 18px;
  }

  .course-card {
    border-radius: 16px;
    overflow: hidden;
  }

  .card-thumb {
    height: 180px;
  }

  .card-body {
    padding: 16px;
  }

  .controls-bar { 
    flex-direction: column; 
    align-items: stretch;
    gap: 12px;
  }

  .search-box {
    width: 100%;
  }

  .filter-group { 
    width: 100%; 
    display: flex;
    gap: 10px;
  }

  .custom-select { 
    flex: 1; 
  }

  .select-btn { 
    width: 100%; 
    justify-content: space-between; 
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  /* Hide login/signup buttons on mobile — use hamburger menu instead */
  .nav-actions .btn-outline,
  .nav-actions .btn-primary {
    display: none;
  }

  .nav-actions .kebab-btn {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .logo-area span.brand {
    font-size: 1.2rem;
  }

  .logo-area span.tagline {
    font-size: 0.55rem;
  }

  .logo-area img {
    height: 36px;
    width: 36px;
  }
}

@media (max-width: 480px) {
  .page { padding: 20px 12px 80px; }
  
  .nav-user-chip {
    padding: 4px 8px;
    font-size: 0.82rem;
    max-width: 110px;
  }

  .nav-user-chip img {
    width: 24px;
    height: 24px;
  }

  .dashboard-stats { 
    grid-template-columns: 1fr 1fr; 
    gap: 12px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-val {
    font-size: 1.5rem;
  }

  .enrolled-card-top { flex-direction: column; }
  .enrolled-thumb { width: 100%; height: 150px; }
}


/* ═══════════════ PAYMENT MODAL & CHECKOUT STYLES ═══════════════ */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: pmFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.payment-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px var(--primary-glow);
  animation: pmSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

body.light-theme .payment-modal-card {
  background: #FFFFFF;
  box-shadow: 0 30px 80px rgba(124, 58, 237, 0.15), 0 0 30px rgba(0,0,0,0.08);
}

@keyframes pmSlideUp {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.pm-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.pm-header-left h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.pm-header-left p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.pm-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.pm-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: rotate(90deg);
}

.payment-modal-body {
  padding: 24px 26px;
}

.pm-order-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.pm-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.pm-course-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px 0;
  line-height: 1.35;
}

.pm-course-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-price-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pm-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.pm-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border-radius: 6px;
  font-weight: 600;
}

.pm-coupon-box {
  margin-bottom: 18px;
}

.pm-coupon-input-group {
  display: flex;
  gap: 8px;
}

.pm-coupon-input-group input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.9rem;
}

body.light-theme .pm-coupon-input-group input {
  background: #F8FAFC;
}

.pm-coupon-btn {
  background: var(--bg-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.pm-coupon-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pm-coupon-msg {
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 18px;
}

.pm-breakdown {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.pm-b-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pm-total-row {
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  padding-top: 8px;
  margin-bottom: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.pm-total-highlight {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.pm-methods-section {
  margin-bottom: 18px;
}

.pm-section-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.pm-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media(max-width: 500px) {
  .pm-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pm-method-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.pm-method-opt:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.pm-method-opt.selected {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 16px var(--primary-glow);
}

.pm-opt-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.pm-method-opt.selected .pm-opt-check {
  display: flex;
}

.pm-method-opt img {
  width: 44px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.pm-method-opt span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.pm-subform {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  animation: pmFadeIn 0.3s ease;
}

.pm-subform-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-input-wrap {
  margin-bottom: 10px;
}

.pm-input-wrap input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

body.light-theme .pm-input-wrap input {
  background: #F8FAFC;
}

.pm-input-wrap input:focus {
  border-color: var(--primary);
}

.pm-input-row {
  display: flex;
  gap: 10px;
}

.pm-input-row .pm-input-wrap {
  flex: 1;
}

.pm-pay-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #3B82F6);
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 25px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pm-pay-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px var(--primary-glow);
}

.pm-pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pm-pay-btn.processing {
  background: linear-gradient(135deg, #6D28D9, #2563EB);
  pointer-events: none;
}

.pm-security-note {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ═══════════════ EXTRA MOBILE POLISH & BUG FIXES (< 480px) ═══════════════ */
@media (max-width: 480px) {
  .page {
    padding: 16px 12px 100px !important;
  }
  .page-header {
    padding: 18px 14px !important;
    border-radius: 16px !important;
  }
  .page-title {
    font-size: 1.4rem !important;
  }
  .page-subtitle {
    font-size: 0.85rem !important;
  }
  .header-stat {
    width: 100% !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .header-stat .stat-count {
    font-size: 1.5rem !important;
  }
  .course-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .course-card {
    border-radius: 16px !important;
  }
  .card-thumb {
    height: 180px !important;
  }
  .card-body {
    padding: 14px !important;
  }
  .payment-modal-overlay {
    padding: 10px !important;
  }
  .payment-modal-card {
    max-height: 94vh !important;
    border-radius: 16px !important;
  }
  .payment-modal-header {
    padding: 16px 14px !important;
  }
  .payment-modal-body {
    padding: 16px 14px !important;
  }
  .pm-order-summary {
    padding: 12px !important;
    border-radius: 12px !important;
  }
  .pm-thumb {
    width: 60px !important;
    height: 40px !important;
  }
  .pm-input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    padding: 11px 12px !important;
  }
  .enrolled-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .enrolled-card {
    border-radius: 16px !important;
  }
  .enrolled-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .enrolled-actions .continue-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .enrolled-actions .unenroll-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

