/* =====================================================
   LOGINAR LMS - Design System
   Putih-Oranye/Merah, Dark Mode, Simple & Elegant
   ===================================================== */

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

/* === CSS VARIABLES === */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A25;
  --primary-light: #FFF0EB;
  --secondary: #E63946;
  --secondary-light: #FDECEA;
  --accent: #FF9F1C;

  --bg: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #F1F3F5;
  --surface: #FFFFFF;
  --surface-2: #F8F9FA;
  --border: #E9ECEF;
  --border-light: #F1F3F5;

  --text-primary: #1A1A2E;
  --text-secondary: #495057;
  --text-muted: #868E96;
  --text-light: #ADB5BD;

  --success: #51CF66;
  --warning: #FFD43B;
  --info: #339AF0;
  --danger: #FF6B6B;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.15);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-main: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --transition: all 0.25s ease;
  --nav-height: 70px;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #0F0F0F;
  --bg-secondary: #1A1A1A;
  --bg-tertiary: #222222;
  --surface: #1A1A1A;
  --surface-2: #222222;
  --border: #2E2E2E;
  --border-light: #252525;

  --text-primary: #F1F3F5;
  --text-secondary: #CED4DA;
  --text-muted: #868E96;
  --text-light: #495057;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.6);
  --primary-light: rgba(255,107,53,0.12);
  --secondary-light: rgba(230,57,70,0.12);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--text-secondary); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* === NAVBAR === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
[data-theme="dark"] .navbar {
  background: rgba(26,26,26,0.92);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800;
  color: var(--text-primary);
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.9rem; font-weight: 800;
}
.navbar-brand span { color: var(--primary); }
.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.theme-logo-dark { display: none; }
[data-theme="dark"] .theme-logo-light { display: none; }
[data-theme="dark"] .theme-logo-dark { display: block; }
.navbar-nav {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.navbar-nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-weight: 500; font-size: 0.9rem;
  transition: var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--primary); background: var(--primary-light);
}

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); border-radius: var(--radius-sm);
  min-width: 220px; padding: 8px 0;
  opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001;
  display: flex; flex-direction: column; gap: 4px;
}
.dropdown:hover .dropdown-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); top: 100%;
}
.dropdown-menu a {
  display: block; padding: 10px 16px; font-weight: 500; font-size: 0.9rem;
  color: var(--text-secondary); border-radius: 0; margin: 0 8px;
}
.dropdown-menu a:hover, .dropdown-menu a.active {
  color: var(--primary); background: var(--primary-light);
  border-radius: var(--radius-sm);
}
.dropdown-toggle i { font-size: 0.75rem; margin-left: 6px; transition: transform 0.2s; }
.dropdown:hover .dropdown-toggle i { transform: rotate(180deg); }

/* Mega Menu Styles */
.dropdown-menu.mega-menu {
  min-width: 580px;
  padding: 18px;
  left: 0;
}
@media (max-width: 768px) {
  .dropdown-menu.mega-menu {
    min-width: 100%;
    padding: 12px;
  }
}
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .mega-menu-grid { grid-template-columns: 1fr; }
}
.mega-menu-grid .mega-menu-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px;
  padding: 14px !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition);
  margin: 0 !important;
  text-decoration: none;
}
.mega-menu-grid .mega-menu-item:hover, .mega-menu-grid .mega-menu-item.active {
  background: var(--bg-secondary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .mega-menu-grid .mega-menu-item:hover,
[data-theme="dark"] .mega-menu-grid .mega-menu-item.active {
  background: var(--bg-tertiary) !important;
}
.mega-menu-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.mega-menu-grid .mega-menu-item:hover .mega-menu-icon {
  transform: scale(1.1);
}
.mega-menu-text {
  display: flex;
  flex-direction: column;
}
.mega-menu-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 3px;
  transition: color 0.2s;
}
.mega-menu-grid .mega-menu-item:hover .mega-menu-title {
  color: var(--primary);
}
.mega-menu-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 400;
}

.navbar-actions { display: flex; align-items: center; gap: 10px; }
.btn-dark-mode {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
}
.btn-dark-mode:hover { background: var(--primary); color: white; border-color: var(--primary); }
.navbar-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger-bar { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); margin: 5px 0; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: white; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(255,107,53,0.35); }
.btn-secondary { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-secondary:hover { background: #c42836; color: white; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; border-color: white; color: white; }
.btn-outline-white:hover { background: white; color: var(--primary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-icon { padding: 10px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-success { background: var(--success); border-color: var(--success); color: white; }
.btn-block { width: 100%; }
.btn-google { background: white; color: #444; border-color: #ddd; box-shadow: var(--shadow-sm); }
.btn-google:hover { background: #f8f9fa; border-color: #ccc; transform: translateY(-1px); box-shadow: var(--shadow); color: #333; }
[data-theme="dark"] .btn-google { background: #222; color: #eee; border-color: #333; }
[data-theme="dark"] .btn-google:hover { background: #2a2a2a; border-color: #444; color: white; }

/* === CARDS === */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-body { padding: 24px; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Course Card - Premium Redesign */
.course-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer;
  height: 100%;
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.course-card-img { width: 100%; height: 190px; object-fit: cover; position: relative; overflow: hidden; }
.course-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.course-card:hover .course-card-img img { transform: scale(1.08); }

.course-card-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.5px;
  background: rgba(255,107,53,0.9); color: white;
  text-transform: uppercase; backdrop-filter: blur(4px); z-index: 2;
}

.course-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; color: var(--text-primary); line-height: 1.4; transition: var(--transition); }
.course-card:hover .course-card-title { color: var(--primary); }

.course-card-desc { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-bottom: 20px; line-height: 1.6; }

.course-card-meta { display: flex; align-items: center; gap: 16px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.course-card-meta span { display: flex; align-items: center; gap: 6px; }
.course-card-meta i { font-size: 0.85rem; }

.course-card-footer { 
  display: flex; align-items: center; justify-content: space-between; 
  padding: 18px 24px; 
  background: var(--bg-secondary); 
  border-top: 1px solid var(--border); 
}

.course-price-container { display: flex; flex-direction: column; }
.course-price { font-size: 1.15rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.course-price-old { font-size: 0.82rem; color: var(--text-light); text-decoration: line-through; }

.course-rating { 
  display: flex; align-items: center; gap: 6px; 
  padding: 4px 10px; 
  background: rgba(255,159,28,0.1); 
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; color: var(--accent); 
}

.mentor-mini { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px dotted var(--border); }
.mentor-mini img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }
.mentor-mini span { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }

/* === FORMS === */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 6px; color: var(--text-primary); }
.form-control {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-primary); font-family: var(--font-main); font-size: 0.9rem;
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.12); }
.form-control::placeholder { color: var(--text-light); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23868E96' d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* === BADGES === */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--secondary-light); color: var(--secondary); }
.badge-success { background: rgba(81,207,102,0.12); color: #2f9e44; }
.badge-warning { background: rgba(255,212,59,0.15); color: #94710a; }
.badge-muted { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-info { background: rgba(51,154,240,0.12); color: #1c7ed6; }

/* === HERO SECTION === */
.hero {
  min-height: 100vh; padding-top: var(--nav-height);
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 60%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(255,107,53,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { max-width: 600px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 0.82rem; font-weight: 700; margin-bottom: 20px;
  border: 1px solid rgba(255,107,53,0.2);
}
.hero h1 { margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.05rem; margin-bottom: 32px; color: var(--text-secondary); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; }
.stat-item h3 { font-size: 1.6rem; color: var(--primary); margin-bottom: 4px; }
.stat-item p { font-size: 0.82rem; margin: 0; }
.hero-visual { position: relative; }
.hero-visual-card {
  background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow-lg); max-width: 360px;
}

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.course-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* === SECTION HEADER === */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .section-tag {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: 1px;
  text-transform: uppercase;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { font-size: 1rem; color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* === FEATURES === */
.feature-card {
  padding: 28px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  transition: var(--transition); text-align: center;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.feature-icon {
  width: 60px; height: 60px; border-radius: var(--radius);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 16px;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

/* === TESTIMONIALS === */
.testimonial-card {
  background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); padding: 24px;
  position: relative;
}
.testimonial-card::before {
  content: '"'; font-size: 4rem; color: var(--primary); opacity: 0.3;
  position: absolute; top: 0; left: 20px; line-height: 1; font-family: serif;
}
.testimonial-text { font-style: italic; color: var(--text-secondary); margin-bottom: 16px; padding-top: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.testimonial-author h4 { font-size: 0.9rem; margin: 0; }
.testimonial-author span { font-size: 0.78rem; color: var(--text-muted); }

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 80px 0; text-align: center; color: white;
}
.cta-section h2 { color: white; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 32px; font-size: 1rem; }

/* === ALERT === */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; font-size: 0.875rem; font-weight: 500;
}
.alert-success { background: rgba(81,207,102,0.12); color: #2f9e44; border: 1px solid rgba(81,207,102,0.3); }
.alert-error { background: rgba(255,107,107,0.12); color: #c92a2a; border: 1px solid rgba(255,107,107,0.3); }
.alert-info { background: rgba(51,154,240,0.12); color: #1c7ed6; border: 1px solid rgba(51,154,240,0.3); }
.alert-warning { background: rgba(255,212,59,0.15); color: #94710a; border: 1px solid rgba(255,212,59,0.3); }

/* === FOOTER === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-brand { margin-bottom: 16px; }
.footer-brand .navbar-brand { text-decoration: none; }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; }
.footer-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* === PROGRESS BAR === */
.progress { background: var(--bg-tertiary); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 20px; transition: width 0.6s ease; }
.progress-bar-success { background: linear-gradient(90deg, var(--success), #40c057); }

/* === TABLES === */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; color: var(--text-secondary); vertical-align: middle; }
tr:hover td { background: var(--bg-secondary); }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius-md);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform 0.25s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { padding: 24px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; }
.btn-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg-tertiary); cursor: pointer; font-size: 1rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.btn-close:hover { background: var(--danger); color: white; }

/* === LOADING / SPINNER === */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === AUTH PAGES === */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: calc(var(--nav-height) + 20px) 20px 20px; background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%); }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); padding: 48px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 0.78rem; color: var(--text-muted); }
.demo-accounts { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; border: 1px solid var(--border); }
.demo-accounts h5 { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.demo-item { font-size: 0.78rem; color: var(--text-secondary); cursor: pointer; padding: 4px 0; display: flex; justify-content: space-between; }
.demo-item:hover { color: var(--primary); }

/* === COURSE DETAIL === */
.course-detail-hero {
  padding-top: calc(var(--nav-height) + 40px); padding-bottom: 40px;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  color: white;
}
.course-detail-hero h1 { color: white; }
.course-detail-hero p { color: rgba(255,255,255,0.8); }
.course-meta-bar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.course-meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.course-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 40px 0; }
.course-sidebar { position: sticky; top: calc(var(--nav-height) + 20px); align-self: start; }
.course-purchase-card { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow-md); }
.course-price-display { margin-bottom: 20px; }
.course-price-display .price-main { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.course-price-display .price-original { font-size: 0.95rem; color: var(--text-muted); text-decoration: line-through; }
.course-price-display .price-discount { background: var(--secondary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; margin-left: 8px; }
.course-includes { list-style: none; margin-bottom: 20px; }
.course-includes li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 0.85rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.course-includes li:last-child { border: none; }
.course-includes li .icon { color: var(--primary); }
.curriculum-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.curriculum-header { padding: 14px 16px; background: var(--bg-secondary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.9rem; }
.curriculum-lessons { padding: 12px; }
.lesson-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 6px; font-size: 0.83rem; color: var(--text-secondary); }
.lesson-item:hover { background: var(--primary-light); color: var(--primary); }
.lesson-item .lesson-type-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.lesson-item.free .lesson-type-icon { background: var(--primary-light); color: var(--primary); }

/* === TABS === */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.tab-btn { padding: 10px 20px; background: none; border: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); position: relative; transition: var(--transition); }
.tab-btn::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary); transform: scaleX(0); transition: var(--transition); }
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === UTILITY === */
.text-primary-color { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-0 { padding: 0; }

/* Toast Notification */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow-md); border-left: 4px solid var(--primary); display: flex; align-items: center; gap: 10px; min-width: 280px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast-msg { font-size: 0.87rem; color: var(--text-primary); font-weight: 500; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-sidebar { position: static; }
}
@media (max-width: 768px) {
  .navbar-nav, .navbar-actions .btn { display: none; }
  .navbar-hamburger { display: block; }
  .navbar-nav.open { display: flex; flex-direction: column; position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--surface); padding: 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .navbar-actions { gap: 6px; }
  .navbar-actions .btn { display: none; }
  .navbar-actions .btn-dark-mode { display: flex; }

  .hero { padding-top: calc(var(--nav-height) + 20px); padding-bottom: 40px; }
  .hero-visual { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .hero-stats { gap: 20px; }
  .auth-card { padding: 32px 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Bottom Navigation Styles */
  body { padding-bottom: 70px; } /* Ensure content is not hidden behind bottom nav */
  
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }
  
  [data-theme="dark"] .bottom-nav {
    background: rgba(26, 26, 26, 0.95);
    border-top: 1px solid #333;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    flex: 1;
    height: 100%;
    gap: 4px;
    transition: var(--transition);
  }

  .bottom-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .bottom-nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
  }

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

  .bottom-nav-item.active i {
    transform: translateY(-2px);
  }
}

/* Hide Bottom Nav on Desktop */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* WhatsApp Float Button */
.wa-float-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 34px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.wa-float-btn:hover {
  transform: scale(1.1);
  color: white;
}

@media (max-width: 768px) {
  .wa-float-btn {
    bottom: 90px; /* Above the bottom nav bar */
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
}
