/* ===============================================
   Doctor Rand - Arabic E-Learning Platform
   Udemy/Coursera-Inspired Design System
   RTL-First | Custom CSS | Cairo Font
   =============================================== */

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

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Primary Palette - Udemy-inspired deep purple */
  --color-primary: #5624d0;
  --color-primary-hover: #401b9c;
  --color-primary-dark: #401b9c;
  --color-primary-light: #7c4dff;
  --color-primary-bg: #f3f0ff;
  --color-primary-bg-hover: #ede8ff;

  /* Accent - Warm Orange for prices, highlights */
  --color-accent: #e85d04;
  --color-accent-hover: #c44e03;
  --color-accent-light: #ff7b2e;
  --color-accent-bg: #fff4ed;

  /* Success - Emerald Green for progress, checks */
  --color-success: #1aa776;
  --color-success-hover: #158f65;
  --color-success-bg: #e6f9f1;

  /* Semantic Colors */
  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-info: #3b82f6;
  --color-info-bg: #eff6ff;
  --color-danger: #ef4444;

  /* Neutrals */
  --color-surface: #ffffff;
  --color-surface-hover: #f9fafb;
  --color-background: #f7f9fa;
  --color-background-alt: #f0f0f5;
  --color-text: #1c1d1f;
  --color-text-secondary: #6a6f73;
  --color-text-muted: #6a6f73;
  --color-text-light: #9da3a7;
  --color-text-lighter: #b4b9bd;
  --color-border: #d1d7dc;
  --color-border-light: #e8e9eb;

  /* Social */
  --color-whatsapp: #25d366;
  --color-instagram: #e1306c;

  /* Typography */
  --font-primary: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-headings: 'Cairo', sans-serif;

  /* Font Weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Spacing (8px grid) */
  --sp-1: 0.25rem;   /* 4px */
  --sp-2: 0.5rem;    /* 8px */
  --sp-3: 0.75rem;   /* 12px */
  --sp-4: 1rem;      /* 16px */
  --sp-5: 1.25rem;   /* 20px */
  --sp-6: 1.5rem;    /* 24px */
  --sp-8: 2rem;      /* 32px */
  --sp-10: 2.5rem;   /* 40px */
  --sp-12: 3rem;     /* 48px */
  --sp-16: 4rem;     /* 64px */
  --sp-20: 5rem;     /* 80px */
  --sp-24: 6rem;     /* 96px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 4px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --container-max: 1340px;
  --container-narrow: 800px;
  --container-padding: 1.5rem;
  --navbar-height: 64px;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-overlay: 1040;
  --z-modal: 1050;
  --z-toast: 1060;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  padding-top: var(--navbar-height);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  list-style: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
}

h6 {
  font-size: 1rem;
  font-weight: var(--fw-semibold);
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-4);
  line-height: 1.7;
}

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-center { text-align: center; }
.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.section {
  padding: var(--sp-16) 0;
}

.section-sm {
  padding: var(--sp-12) 0;
}

.section-lg {
  padding: var(--sp-20) 0;
}

.section-alt {
  background-color: var(--color-surface);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.reviews-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-md-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start { display: flex; align-items: center; justify-content: flex-start; }
.flex-end { display: flex; align-items: center; justify-content: flex-end; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }

/* Gap */
.gap-xs { gap: var(--sp-1); }
.gap-sm { gap: var(--sp-2); }
.gap-md { gap: var(--sp-4); }
.gap-lg { gap: var(--sp-6); }
.gap-xl { gap: var(--sp-8); }

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-fixed);
  height: var(--navbar-height);
  background-color: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--color-border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition-base);
  overflow: visible;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.2;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand span:first-child {
  font-size: 1.35rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.navbar-brand:hover span:first-child {
  color: var(--color-primary-hover);
}

.navbar-subtitle {
  font-size: 0.7rem;
  color: var(--color-text-light);
  font-weight: var(--fw-medium);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  overflow: visible;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

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

.nav-link.active {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: var(--sp-3);
  left: var(--sp-3);
  height: 2px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
}

/* Nav User Display */
.nav-user {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-background);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-light);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  padding: var(--sp-1) var(--sp-2);
  background: var(--color-background);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-inline-start: var(--sp-2);
}

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

.lang-toggle svg {
  flex-shrink: 0;
}

/* RTL/LTR Support */
html[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .navbar-brand {
  flex-direction: column;
  align-items: flex-start;
}

html[dir="ltr"] .nav-link.active::after {
  right: auto;
  left: var(--sp-3);
}

html[dir="ltr"] .footer-content {
  text-align: left;
}

html[dir="ltr"] .footer-section h3::after {
  right: auto;
  left: 0;
  background: linear-gradient(90deg, #e85d04, transparent);
}

html[dir="ltr"] .footer-link::before {
  content: '→';
  transform: translateX(-5px);
}

html[dir="ltr"] .footer-link:hover {
  transform: translateX(4px);
}

html[dir="ltr"] .footer-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-dropdown-toggle:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-bg);
}

.nav-dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.nav-dropdown-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-light);
}

.nav-dropdown-item:hover svg {
  color: var(--color-primary);
}

/* Message badge */
.nav-item-with-badge {
  position: relative;
}

.msg-badge {
  width: 8px;
  height: 8px;
  background-color: var(--color-error);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-right: auto;
}

/* Mobile Toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  cursor: pointer;
  z-index: calc(var(--z-fixed) + 10);
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

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

@media (max-width: 1024px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--navbar-height) + var(--sp-4)) var(--sp-6) var(--sp-6);
    gap: var(--sp-1);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    overflow-y: auto;
    z-index: var(--z-fixed);
  }

  .navbar-nav.active {
    right: 0;
  }

  .nav-link {
    padding: var(--sp-3) var(--sp-4);
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background-color: var(--color-primary-bg);
  }

  .nav-dropdown {
    padding-bottom: 0;
  }

  .nav-dropdown-toggle {
    padding: var(--sp-3) var(--sp-4);
    font-size: 0.95rem;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 var(--sp-4);
    display: none;
    background: transparent;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-item {
    padding: var(--sp-2) var(--sp-3);
    font-size: 0.85rem;
  }

  .nav-user {
    text-align: center;
    margin-top: var(--sp-2);
  }

  .lang-toggle {
    justify-content: center;
    margin: var(--sp-3) 0;
    margin-inline-start: 0;
  }
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: calc(var(--z-fixed) - 1);
}

.nav-overlay.active {
  display: block;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-primary);
  font-weight: var(--fw-bold);
  font-size: 0.9375rem;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 1; }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(86, 36, 208, 0.2); }
.btn:focus:not(:focus-visible) { box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Primary - Deep Purple */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
}

.btn-primary:active,
.btn-primary:focus {
  background-color: var(--color-primary-hover);
  color: #ffffff;
}

/* Secondary - Outlined */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Accent - Orange */
.btn-accent {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

.btn-accent:active,
.btn-accent:focus {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

/* Success - Green */
.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--color-success-hover);
  color: #ffffff;
}

/* Danger */
.btn-danger {
  background-color: var(--color-error);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.btn-ghost:active,
.btn-ghost:focus {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

/* Light */
.btn-light {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.btn-light:hover {
  background-color: var(--color-border-light);
  color: var(--color-text);
}

/* White */
.btn-white {
  background-color: #ffffff;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

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

/* Sizes */
.btn-sm {
  font-size: 0.8125rem;
  padding: var(--sp-2) var(--sp-4);
}

.btn-lg {
  font-size: 1.0625rem;
  padding: var(--sp-4) var(--sp-8);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-icon {
  padding: var(--sp-2);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* ===== CARDS ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-body {
  padding: var(--sp-6);
}

.card-header {
  padding: var(--sp-6) var(--sp-6) 0;
}

.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
  line-height: 1.4;
}

.card-text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}

/* Course Card - Udemy style */
.course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

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

.course-card .card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}

.course-card .card-body {
  padding: var(--sp-4) var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card .card-title {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card .course-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: var(--sp-3);
}

.course-card .course-meta svg {
  width: 14px;
  height: 14px;
}

.course-card .course-price {
  font-size: 1.125rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin-top: auto;
}

.course-card .course-price.free {
  color: var(--color-success);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  line-height: 1.4;
}

.badge-primary {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.badge-accent {
  background-color: var(--color-accent-bg);
  color: var(--color-accent);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: #92400e;
}

.badge-error {
  background-color: var(--color-error-bg);
  color: var(--color-error);
}

.badge-promotion {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.badge-light {
  background-color: var(--color-background-alt);
  color: var(--color-text-secondary);
}

.badge-dark {
  background-color: var(--color-text);
  color: #ffffff;
}

.badge-secondary {
  background-color: var(--color-background-alt);
  color: var(--color-text-secondary);
}

/* Pill shape */
.badge-pill {
  border-radius: var(--radius-full);
  padding: var(--sp-1) var(--sp-4);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.form-label .required {
  color: var(--color-error);
  margin-right: var(--sp-1);
}

.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.9375rem;
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.5;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-lighter);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a6f73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: var(--sp-1);
}

/* Star Rating Input */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

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

.rating-input label {
  cursor: pointer;
  width: 32px;
  height: 32px;
  color: #d1d5db;
  transition: color 0.15s ease;
}

.rating-input label svg {
  width: 100%;
  height: 100%;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
  color: #fbbf24;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: var(--sp-1);
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 0.9375rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Radio group */
.form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
}

.radio-option:hover {
  border-color: var(--color-primary-light);
}

.radio-option.selected,
.radio-option:has(input:checked) {
  border-color: var(--color-primary);
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

/* File input */
.form-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-8);
  background: var(--color-background);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

.form-file-label:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.form-file-label svg {
  width: 24px;
  height: 24px;
}

/* ===== TABLES ===== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background: var(--color-background);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  text-align: right;
  white-space: nowrap;
}

.table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--color-surface-hover);
}

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

/* ===== ALERTS / FLASH MESSAGES ===== */
.flash-messages {
  position: fixed;
  top: calc(var(--navbar-height) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 90%;
  max-width: 500px;
}

.flash-message,
.alert {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.flash-message svg,
.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert-success {
  background-color: var(--color-success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-success svg { color: var(--color-success); }

.alert-warning {
  background-color: var(--color-warning-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-warning svg { color: var(--color-warning); }

.alert-danger,
.alert-error {
  background-color: var(--color-error-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-danger svg,
.alert-error svg { color: var(--color-error); }

.alert-info {
  background-color: var(--color-info-bg);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-info svg { color: var(--color-info); }

/* Static alerts (in-page) */
.alert-static {
  position: static;
  box-shadow: none;
  margin-bottom: var(--sp-4);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ===== PAGE HEADER ===== */
.page-header {
  padding: var(--sp-10) 0 var(--sp-8);
}

.page-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin-bottom: 0;
}

.page-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: var(--sp-2);
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  gap: var(--sp-3);
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 100%);
  color: #ffffff;
  padding: var(--sp-20) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--sp-4);
  line-height: 1.25;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.125rem;
  max-width: 600px;
  line-height: 1.8;
}

.hero .btn-primary {
  background-color: #ffffff;
  color: var(--color-primary);
  font-weight: var(--fw-extrabold);
}

.hero .btn-primary:hover {
  background-color: rgba(255,255,255,0.9);
  color: var(--color-primary-hover);
}

.hero .btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}

.hero .btn-outline:hover {
  background-color: rgba(255,255,255,0.15);
  border-color: #ffffff;
  color: #ffffff;
}

.hero-content {
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: var(--sp-10);
  margin-top: var(--sp-10);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: var(--fw-extrabold);
  color: #ffffff;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-header h2 {
  margin-bottom: var(--sp-3);
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-header-line {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin: var(--sp-4) auto 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-background-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress-fill.success {
  background: var(--color-success);
}

.progress-text {
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  margin-top: var(--sp-1);
}

/* ===== ACCORDION ===== */
.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.accordion-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  text-align: right;
  transition: background-color var(--transition-fast);
}

.accordion-trigger:hover {
  background: var(--color-surface-hover);
}

.accordion-trigger svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-light);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.accordion-item.open .accordion-trigger svg {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-item.open .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: var(--sp-8);
}

.tab-btn {
  padding: var(--sp-3) var(--sp-6);
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: all var(--transition-fast);
}

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

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

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

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

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  color: var(--color-text-light);
}

.modal-close:hover {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-start;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--color-text-lighter);
  margin: 0 auto var(--sp-6);
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
}

.empty-state p {
  color: var(--color-text-light);
  margin-bottom: var(--sp-6);
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 50%, #3a0ca3 100%);
  color: rgba(255,255,255,0.9);
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-section h3 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-3);
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #e85d04, transparent);
  border-radius: 2px;
}

.footer-section p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link::before {
  content: '←';
  opacity: 0;
  transform: translateX(5px);
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(-4px);
}

.footer-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--sp-8);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-bottom: var(--sp-2);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

/* ===== SOCIAL FLOAT ===== */
.social-float {
  position: fixed;
  bottom: var(--sp-6);
  left: var(--sp-6);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  color: #ffffff;
}

.social-btn svg {
  width: 24px;
  height: 24px;
}

.social-btn.whatsapp {
  background: var(--color-whatsapp);
}

.social-btn.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

/* ===== STATS SECTION ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-6);
}

.stat-card {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: box-shadow var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--sp-4);
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
  color: var(--color-warning);
  fill: var(--color-warning);
}

.testimonial-text {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-5);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.testimonial-name {
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ===== SESSION CARDS ===== */
.session-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.session-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.session-card-header {
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-card-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.0625rem;
}

.session-card-body {
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.session-info-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.session-info-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.session-card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== CHECKOUT LAYOUT ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-8);
  align-items: start;
}

.checkout-summary {
  position: sticky;
  top: calc(var(--navbar-height) + var(--sp-6));
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
    order: -1;
  }
}

/* ===== COURSE DETAIL LAYOUT ===== */
.course-detail-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 100%);
  color: #ffffff;
  padding: var(--sp-12) 0;
}

.course-detail-hero h1 {
  color: #ffffff;
  margin-bottom: var(--sp-3);
}

.course-detail-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.0625rem;
  max-width: 700px;
}

.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-8);
  align-items: start;
  margin-top: calc(-1 * var(--sp-10));
  position: relative;
  z-index: 1;
}

.course-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--navbar-height) + var(--sp-6));
}

.course-sidebar-price {
  padding: var(--sp-6);
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
}

.course-sidebar-price .price {
  font-size: 2rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
}

.course-sidebar-price .price.free {
  color: var(--color-success);
}

.course-sidebar-body {
  padding: var(--sp-5) var(--sp-6);
}

.course-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.course-sidebar-info-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.course-sidebar-info-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
}

@media (max-width: 900px) {
  .course-detail-layout {
    grid-template-columns: 1fr;
    margin-top: var(--sp-6);
  }

  .course-sidebar {
    position: static;
    order: -1;
  }
}

/* Course content sections */
.course-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.outcome-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ===== DASHBOARD ===== */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 100%);
  color: #ffffff;
  padding: var(--sp-10) 0;
  border-radius: 0;
}

.dashboard-welcome h1 {
  color: #ffffff;
  margin-bottom: var(--sp-2);
}

.dashboard-welcome p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}

.dashboard-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
}

.dashboard-stat .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}

.dashboard-stat .stat-icon svg {
  width: 24px;
  height: 24px;
}

.dashboard-stat .stat-icon.primary {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.dashboard-stat .stat-icon.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.dashboard-stat .stat-icon.accent {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

/* ===== COURSE CONTENT VIEWER ===== */
.content-viewer-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - var(--navbar-height));
}

.content-sidebar {
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-light);
  overflow-y: auto;
  height: calc(100vh - var(--navbar-height));
  position: sticky;
  top: var(--navbar-height);
}

.content-sidebar-header {
  padding: var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--color-border-light);
}

.content-sidebar-header h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

.chapter-item {
  border-bottom: 1px solid var(--color-border-light);
}

.chapter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  font-weight: var(--fw-semibold);
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  background: var(--color-background);
}

.chapter-title:hover {
  background: var(--color-background-alt);
}

.chapter-title svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  transition: transform var(--transition-fast);
}

.chapter-item.open .chapter-title svg {
  transform: rotate(180deg);
}

.lesson-list {
  display: none;
}

.chapter-item.open .lesson-list {
  display: block;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-8);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lesson-item:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.lesson-item.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.lesson-item.completed {
  color: var(--color-success);
}

.lesson-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.content-main {
  padding: var(--sp-8);
}

@media (max-width: 768px) {
  .content-viewer-layout {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-bottom: 1px solid var(--color-border-light);
  }
}

/* ===== VIDEO PLAYER ===== */
.video-player-wrapper {
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-6);
}

.video-player-wrapper video,
.video-player-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--color-background);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: var(--sp-2);
}

.auth-header p {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
  color: var(--color-text-light);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-footer {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  background: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--sp-1);
  margin-bottom: var(--sp-8);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-3);
  text-align: center;
  font-weight: var(--fw-semibold);
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== ADMIN PAGES ===== */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-header h3 {
  margin-bottom: 0;
  font-size: 1.0625rem;
}

.admin-card-body {
  padding: var(--sp-6);
}

/* Action buttons in tables */
.action-buttons {
  display: flex;
  gap: var(--sp-2);
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-edit:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-error);
  background: var(--color-error-bg);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-delete:hover {
  background: var(--color-error);
  color: #ffffff;
}

/* ===== MESSAGING ===== */
.message-list {
  display: flex;
  flex-direction: column;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
  transition: background-color var(--transition-fast);
}

.message-item:hover {
  background-color: var(--color-surface-hover);
}

.message-item.unread {
  background-color: var(--color-primary-bg);
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-subject {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-1);
  font-size: 0.9375rem;
}

.message-preview {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* Message detail */
.message-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.message-detail-header {
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
}

.message-detail-body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* ===== EVENT PAGES ===== */
.event-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 50%, var(--color-accent) 100%);
  color: #ffffff;
  padding: var(--sp-16) 0;
  text-align: center;
}

.event-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
}

.event-hero p {
  color: rgba(255,255,255,0.85);
  margin: 0 auto;
  max-width: 600px;
}

.event-badge {
  display: inline-flex;
  padding: var(--sp-2) var(--sp-5);
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: #ffffff;
  margin-bottom: var(--sp-6);
  backdrop-filter: blur(4px);
}

/* Event ticket cards */
.ticket-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.ticket-card:hover {
  box-shadow: var(--shadow-lg);
}

.ticket-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.ticket-card-header {
  padding: var(--sp-6);
  text-align: center;
}

.ticket-card.featured .ticket-card-header {
  background: var(--color-primary);
  color: #ffffff;
}

.ticket-card.featured .ticket-card-header h3 {
  color: #ffffff;
}

.ticket-card .ticket-price {
  font-size: 2rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: var(--sp-3) 0;
}

.ticket-card.featured .ticket-price {
  color: #ffffff;
}

.ticket-card-body {
  padding: var(--sp-6);
}

.ticket-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.ticket-feature svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
}

/* ===== INBOX & MESSAGES ===== */
.messages-container {
  max-width: 1000px;
  margin: 0 auto;
}

.message-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 0;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

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

.message-card.unread {
  border-right: 4px solid var(--color-primary);
  background: linear-gradient(to left, var(--color-primary-bg), var(--color-surface) 8%);
}

.message-card-inner {
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.message-header-content {
  flex: 1;
  min-width: 280px;
}

.message-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-primary);
  color: white;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.message-badge-read {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.message-subject {
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 var(--sp-2) 0;
  line-height: 1.4;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.message-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.message-meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.message-preview {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: var(--sp-2) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.message-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-background);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
}

.message-attachment-badge svg {
  width: 16px;
  height: 16px;
}

.message-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Message View Page */
.message-view-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.message-view-header {
  padding: var(--sp-6);
  border-bottom: 2px solid var(--color-border-light);
  background: linear-gradient(135deg, var(--color-primary-bg) 0%, var(--color-surface) 100%);
}

.message-view-subject {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--sp-3);
}

.message-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.message-view-body {
  padding: var(--sp-6);
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-wrap;
  color: var(--color-text);
}

.message-attachments {
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 2px solid var(--color-border-light);
}

.message-attachments-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
}

.attachment-card {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  border: 1px solid var(--color-border-light);
  transition: var(--transition-fast);
}

.attachment-card:hover {
  background: var(--color-background-alt);
  border-color: var(--color-primary-light);
}

.attachment-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.attachment-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.attachment-info {
  flex: 1;
}

.attachment-name {
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--color-text);
}

.attachment-type {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.attachment-preview {
  margin-top: var(--sp-3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.attachment-preview img,
.attachment-preview video {
  max-width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

/* Send Message Form Enhancements */
.compose-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.compose-header {
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.compose-title {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  margin: 0;
}

.compose-body {
  padding: var(--sp-6);
}

/* Inbox Header Tabs */
.inbox-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  background: var(--color-background);
  padding: var(--sp-2);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.inbox-tab {
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.inbox-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.inbox-tab.active {
  background: var(--color-primary);
  color: white;
}

.inbox-tab-count {
  background: rgba(255,255,255,0.2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.inbox-tab.active .inbox-tab-count {
  background: rgba(255,255,255,0.3);
}

/* Message Status Indicators */
.status-unread {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.status-read {
  color: var(--color-success);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .message-header {
    flex-direction: column;
    gap: var(--sp-3);
  }
  
  .message-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .message-actions .btn {
    flex: 1;
    justify-content: center;
  }
  
  .message-meta {
    flex-direction: column;
    gap: var(--sp-2);
  }
  
  .message-view-meta {
    flex-direction: column;
    gap: var(--sp-2);
  }
}

.ticket-card-footer {
  padding: 0 var(--sp-6) var(--sp-6);
}

/* ===== STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: var(--fw-bold);
  background: var(--color-background-alt);
  color: var(--color-text-light);
  border: 2px solid var(--color-border);
  transition: all var(--transition-fast);
}

.stepper-step.active .stepper-circle {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.stepper-step.completed .stepper-circle {
  background: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

.stepper-label {
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-light);
}

.stepper-step.active .stepper-label {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.stepper-step.completed .stepper-label {
  color: var(--color-success);
}

.stepper-line {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--sp-1);
}

.stepper-step.completed + .stepper-line,
.stepper-line.completed {
  background: var(--color-success);
}

/* ===== MISC UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.p-4 { padding: var(--sp-4); }
.p-6 { padding: var(--sp-6); }
.p-8 { padding: var(--sp-8); }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.bg-surface { background: var(--color-surface); }
.bg-background { background: var(--color-background); }

.border { border: 1px solid var(--color-border-light); }
.border-bottom { border-bottom: 1px solid var(--color-border-light); }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Confirmation / success page styles */
.confirmation-page {
  text-align: center;
  padding: var(--sp-16) 0;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  background: var(--color-success-bg);
}

.confirmation-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-success);
}

/* Announcement bar */
.announcement-bar {
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
}

.announcement-bar a {
  color: #ffffff;
  text-decoration: underline;
}

/* ===== PRINT ===== */
@media print {
  .navbar, .footer, .social-float, .flash-messages {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: #ffffff;
  }
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: var(--sp-10) 0;
  }

  .hero {
    padding: var(--sp-12) 0;
  }

  .hero-stats {
    gap: var(--sp-6);
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: var(--sp-6) var(--sp-5);
  }
}

@media (max-width: 768px) {
  .page-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* Enrolled courses card with progress */
.enrolled-course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.enrolled-course-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.enrolled-course-card .card-body {
  padding: var(--sp-5) var(--sp-6);
}

.enrolled-course-card .card-title {
  font-size: 1rem;
  margin-bottom: var(--sp-3);
}

.enrolled-course-card .progress-bar {
  margin-bottom: var(--sp-2);
}

.enrolled-course-card .card-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* ===== FAQ PAGE ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== OPINIONS PAGE ===== */
.opinions-header {
  text-align: center;
  margin-bottom: var(--sp-10);
}

/* Review/testimonial card for opinions page */
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: box-shadow var(--transition-base);
}

.review-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--sp-3);
}

.review-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--color-warning);
  color: var(--color-warning);
}

.review-text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}

.review-author {
  font-weight: var(--fw-semibold);
  font-size: 0.875rem;
  color: var(--color-text);
}

.review-role {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* ===== ANNOUNCEMENT CARDS ===== */
.announcement-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  transition: box-shadow var(--transition-fast);
}

.announcement-card:hover {
  box-shadow: var(--shadow-sm);
}

.announcement-card h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-2);
}

.announcement-card .announcement-date {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: var(--sp-3);
}

.announcement-card .announcement-body {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* Announcement Preview (Admin) */
.announcement-preview {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.announcement-preview.announcement-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border-right: 4px solid #3b82f6;
}

.announcement-preview.announcement-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-right: 4px solid #22c55e;
}

.announcement-preview.announcement-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
  border-right: 4px solid #f59e0b;
}

.announcement-preview.announcement-promo {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
  border-right: 4px solid #8b5cf6;
}

.announcement-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.announcement-info .announcement-icon { color: #3b82f6; }
.announcement-success .announcement-icon { color: #22c55e; }
.announcement-warning .announcement-icon { color: #f59e0b; }
.announcement-promo .announcement-icon { color: #8b5cf6; }

.announcement-content {
  flex: 1;
  min-width: 0;
}

.announcement-title {
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.announcement-message {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  gap: var(--sp-2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--color-surface-hover);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: #ef4444;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-12);
  color: var(--color-text-secondary);
}

/* ===== INLINE STYLES OVERRIDE HELPERS ===== */
/* For templates that use inline style="color: var(--color-text-muted)" etc */
/* These ensure backwards-compatibility */
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-error) !important; }
.text-warning { color: var(--color-warning) !important; }
.bg-primary-light { background: var(--color-primary-bg) !important; }
.bg-success-light { background: var(--color-success-bg) !important; }
