/* =========================================================================
   MagnusIBA Enrolment - PREMIUM EDITION
   Sophisticated UI with refined typography, elegant spacing & premium aesthetics
   ========================================================================= */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* Premium Color Palette - Refined & Sophisticated */
  --white: #ffffff;
  --snow: #fafbfc;
  --pearl: #f4f6f8;
  --silver: #e8ecf1;
  --mist: #dce1e8;
  --slate: #94a3b8;
  --storm: #64748b;
  --charcoal: #475569;
  --graphite: #334155;
  --obsidian: #1e293b;
  --void: #0f172a;

  /* Primary Brand - Deep Indigo */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;

  /* Accent - Teal */
  --accent-400: #2dd4bf;
  --accent-500: #14b8a6;
  --accent-600: #0d9488;

  /* Success - Emerald */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-600: #059669;

  /* Warning - Amber */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  /* Error - Rose */
  --error-50: #fff1f2;
  --error-100: #ffe4e6;
  --error-500: #f43f5e;
  --error-600: #e11d48;

  /* Semantic Colors */
  --bg-primary: var(--snow);
  --bg-secondary: var(--white);
  --bg-tertiary: var(--pearl);
  --bg-elevated: var(--white);
  --bg-interactive: var(--primary-50);

  --text-primary: var(--void);
  --text-secondary: var(--graphite);
  --text-tertiary: var(--storm);
  --text-muted: var(--slate);
  --text-inverse: var(--white);

  --border-subtle: var(--silver);
  --border-default: var(--mist);
  --border-strong: var(--slate);
  --border-focus: var(--primary-500);

  /* Typography Scale - Perfect Fourth (1.333) */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* Spacing Scale - 8px Grid */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */

  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.25rem;   /* 20px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* Shadows - Layered & Subtle */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-inner: inset 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-primary: 0 4px 14px rgba(99, 102, 241, 0.25);
  --shadow-primary-lg: 0 8px 24px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;

  /* Safe Areas */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

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

/* ============================================
   APP LAYOUT
   ============================================ */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  position: relative;
}

/* Premium Background */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--snow) 0%, var(--pearl) 50%, var(--snow) 100%);
}

.fx-layer::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
  animation: floatOrb 30s ease-in-out infinite;
}

.fx-layer::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -15%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.03) 0%, transparent 55%);
  animation: floatOrb 25s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, 2%) scale(1.02); }
  66% { transform: translate(-2%, -1%) scale(0.98); }
}

.grain {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--space-4) + var(--safe-top)) var(--space-6) var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: opacity var(--duration-base) var(--ease-out);
}

.brand:hover {
  opacity: 0.8;
}

.brand .logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.brand:hover .logo {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand .name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

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

.user-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-base) var(--ease-out);
}

.user-pill:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.user-pill .avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
}

.user-pill .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-pill .email {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-6) var(--space-12);
}

.container {
  width: 100%;
  max-width: 560px;
}

.container.wide {
  max-width: 1000px;
}

/* ============================================
   STEP INDICATOR
   ============================================ */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding: var(--space-4) var(--space-6);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.step-dot {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--duration-slow) var(--ease-out);
}

.step-dot.pending {
  background: var(--pearl);
  color: var(--text-muted);
  border: 2px solid var(--border-subtle);
}

.step-dot.active {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
  border: none;
  box-shadow: var(--shadow-primary);
}

.step-dot.active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-200);
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}

.step-dot.completed {
  background: var(--success-500);
  color: var(--white);
  border: none;
}

.step-dot.completed::before {
  content: '';
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.step-line {
  width: 24px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  transition: background var(--duration-slow) var(--ease-out);
}

.step-line.active,
.step-line.completed {
  background: var(--primary-400);
}

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}

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

.card .glow {
  display: none;
}

.card .inner {
  padding: var(--space-8);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
  max-width: 420px;
  margin: 0 auto;
}

/* ============================================
   COURSE CARDS
   ============================================ */
.courses-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.course-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--space-5);
  padding: var(--space-5);
  background: var(--pearl);
  border: 2px solid transparent;
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.course-card:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.course-card.selected {
  background: var(--primary-50);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-focus);
}

.course-card .cover {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  overflow: hidden;
  flex-shrink: 0;
}

.course-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
}

.course-card .course-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.course-card .course-summary {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--white);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-badge.duration { color: var(--primary-600); background: var(--primary-50); }
.meta-badge.live { color: var(--success-600); background: var(--success-50); }
.meta-badge.price { color: var(--warning-600); background: var(--warning-50); }

.course-card .check-mark {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--duration-base) var(--ease-spring);
}

.course-card.selected .check-mark {
  opacity: 1;
  transform: scale(1);
}

.course-card .check-mark::after {
  content: '';
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

/* ============================================
   DISCOUNT BOX
   ============================================ */
.discount-box {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--success-50), rgba(20, 184, 166, 0.05));
  border: 1px solid var(--success-100);
  border-radius: var(--radius-xl);
}

.discount-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.discount-type {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--success-600);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.discount-percent {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--success-600);
}

.price-breakdown {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.original-price {
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-decoration: line-through;
}

.final-price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.discount-timeline {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--success-200);
}

.timeline-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--warning-50);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--warning-600);
}

/* ============================================
   DISCOUNT HINT BANNER
   ============================================ */
.discount-hint {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), rgba(99, 102, 241, 0.08));
  border: 2px dashed var(--primary-200);
  border-radius: var(--radius-xl);
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% {
    border-color: var(--primary-200);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
  50% {
    border-color: var(--primary-400);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
  }
}

.discount-hint__icon {
  font-size: 32px;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.discount-hint__text {
  flex: 1;
}

.discount-hint__text strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: var(--space-1);
}

.discount-hint__text span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.discount-hint__arrow {
  font-size: 24px;
  color: var(--primary-500);
  animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.discount-hint.hidden {
  display: none;
}

/* ============================================
   DISCOUNT CELEBRATION MODAL
   ============================================ */
.discount-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.discount-modal.show {
  display: flex;
  animation: modalFadeIn 0.3s var(--ease-out);
}

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

.discount-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
}

.discount-modal__content {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.4s var(--ease-out);
  overflow: hidden;
}

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

.discount-modal__confetti {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(400px) rotate(720deg);
  }
}

.discount-modal__icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
  animation: celebrateIcon 0.6s var(--ease-out);
}

@keyframes celebrateIcon {
  0% { transform: scale(0) rotate(-45deg); }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.discount-modal__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.discount-modal__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.discount-modal__badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--success-50), rgba(16, 185, 129, 0.15));
  border: 2px solid var(--success-500);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  animation: badgePop 0.5s var(--ease-out) 0.2s both;
}

@keyframes badgePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.discount-modal__badge .type {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--success-600);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.discount-modal__badge .percent {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--success-600);
  line-height: 1;
}

.discount-modal__prices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.discount-modal__prices .original,
.discount-modal__prices .final {
  text-align: center;
}

.discount-modal__prices .label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.discount-modal__prices .original .value {
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-modal__prices .final .value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-600);
}

.discount-modal__prices .arrow {
  font-size: 20px;
  color: var(--success-500);
}

.discount-modal__savings {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--warning-100);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--warning-600);
  margin-bottom: var(--space-6);
}

.discount-modal__btn {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

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

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--error-500);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--pearl);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  transition: all var(--duration-base) var(--ease-out);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  background: var(--silver);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-focus);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input.error {
  border-color: var(--error-500);
  background: var(--error-50);
}

.form-input.valid {
  border-color: var(--success-500);
  background: var(--success-50);
}

.form-hint {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--error-500);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

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

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-group {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--pearl);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.toggle-group:hover {
  background: var(--silver);
}

.toggle-group.active {
  background: var(--primary-50);
  border-color: var(--primary-200);
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--mist);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: background var(--duration-base) var(--ease-out);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-spring);
}

.toggle-group.active .toggle-switch {
  background: var(--primary-500);
}

.toggle-group.active .toggle-switch::after {
  transform: translateX(22px);
}

.toggle-label {
  flex: 1;
}

.toggle-label strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-label p {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   RADIO OPTIONS
   ============================================ */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--pearl);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.radio-option:hover {
  background: var(--silver);
}

.radio-option.selected {
  background: var(--primary-50);
  border-color: var(--primary-500);
}

.radio-dot {
  width: 20px;
  height: 20px;
  border: 2px solid var(--mist);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-base) var(--ease-out);
}

.radio-option.selected .radio-dot {
  border-color: var(--primary-500);
  background: var(--primary-500);
}

.radio-option.selected .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: var(--radius-full);
}

.radio-content {
  flex: 1;
}

.radio-content .label {
  font-weight: 600;
  color: var(--text-primary);
}

.radio-content .desc {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Radio Group Error State */
.radio-group.error .radio-option {
  border-color: var(--error);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload {
  position: relative;
  padding: var(--space-8);
  background: var(--pearl);
  border: 2px dashed var(--mist);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.file-upload:hover {
  background: var(--silver);
  border-color: var(--slate);
}

.file-upload.dragging {
  background: var(--primary-50);
  border-color: var(--primary-400);
  border-style: solid;
}

.file-upload .icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-3);
}

.file-upload .text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.file-upload .hint {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-preview {
  position: relative;
  margin-top: var(--space-4);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--pearl);
  border: 1px solid var(--border-subtle);
}

.file-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.file-preview .remove {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 32px;
  height: 32px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-full);
  border: none;
  color: var(--white);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.file-preview .remove:hover {
  background: var(--error-500);
}

.file-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
}

.file-status.uploading { color: var(--primary-600); }
.file-status.success { color: var(--success-600); }
.file-status.error { color: var(--error-500); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: all var(--duration-base) var(--ease-out);
  user-select: none;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-lg);
}

.btn.primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn.success {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn.success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-default);
}

.btn.ghost:hover:not(:disabled) {
  background: var(--pearl);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn.wide {
  width: 100%;
}

.btn-row {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.btn-row .btn {
  flex: 1;
}

/* ============================================
   PAYMENT INFO
   ============================================ */
.payment-info {
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), rgba(99, 102, 241, 0.03));
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-6);
}

.payment-amount {
  text-align: center;
  margin-bottom: var(--space-5);
}

.payment-amount .label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-2);
}

.payment-amount .value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--primary-600);
}

.payment-amount .currency {
  font-size: var(--text-xl);
  margin-left: var(--space-1);
}

.payment-number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
}

.copy-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--pearl);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

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

.copy-btn.copied {
  background: var(--success-500);
  border-color: var(--success-500);
  color: var(--white);
}

.payment-methods {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.payment-methods img,
.payment-methods span {
  height: 32px;
  opacity: 0.6;
  transition: all var(--duration-base) var(--ease-out);
}

.payment-methods img:hover,
.payment-methods span:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ============================================
   TRANSACTION CHECK
   ============================================ */
.trx-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}

.trx-check.checking {
  background: var(--primary-50);
  color: var(--primary-600);
}

.trx-check.valid,
.trx-check.matched {
  background: var(--success-50);
  color: var(--success-600);
}

.trx-check.invalid {
  background: var(--error-50);
  color: var(--error-500);
}

.trx-check.warning {
  background: var(--warning-50);
  color: var(--warning-600);
}

.trx-check .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-200);
  border-top-color: var(--primary-600);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

/* ============================================
   STATUS TRACKER
   ============================================ */
.status-tracker {
  padding: var(--space-6);
  background: var(--pearl);
  border-radius: var(--radius-2xl);
}

.status-current {
  text-align: center;
  padding: var(--space-8);
  background: var(--white);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-subtle);
}

.status-current.pending {
  background: var(--warning-50);
  border-color: var(--warning-100);
}

.status-current.confirmed {
  background: var(--success-50);
  border-color: var(--success-100);
}

.status-current.rejected {
  background: var(--error-50);
  border-color: var(--error-100);
}

.status-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.status-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.status-current.pending .status-title { color: var(--warning-600); }
.status-current.confirmed .status-title { color: var(--success-600); }
.status-current.rejected .status-title { color: var(--error-500); }

.status-subtitle {
  margin-top: var(--space-2);
  font-size: var(--text-base);
  color: var(--text-tertiary);
}

.status-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: var(--space-1);
  background: var(--mist);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.timeline-item.completed .timeline-dot {
  background: var(--success-500);
}

.timeline-item.current .timeline-dot {
  background: var(--primary-500);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.timeline-content {
  flex: 1;
}

.timeline-content .label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-content .time {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   WARNING & INFO BOXES
   ============================================ */
.warning-box,
.info-box {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}

.warning-box {
  background: var(--warning-50);
  border-left: 4px solid var(--warning-500);
}

.info-box {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
}

.warning-box .title,
.info-box .title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.warning-box .title { color: var(--warning-600); }
.info-box .title { color: var(--primary-600); }

.warning-box .content,
.info-box .content {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.info-box .content a {
  color: var(--primary-600);
  font-weight: 600;
}

.info-box .content a:hover {
  text-decoration: underline;
}

/* ============================================
   SUCCESS CELEBRATION
   ============================================ */
.success-scene {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}

.success-scene.play {
  opacity: 1;
  visibility: visible;
}

.success-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.98) 0%, rgba(250,251,252,0.95) 60%);
}

.success-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark {
  width: 120px;
  height: 120px;
}

.checkmark .circle {
  fill: none;
  stroke: var(--success-500);
  stroke-width: 3;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: drawCircle 0.8s var(--ease-out) forwards;
}

.checkmark .check {
  fill: none;
  stroke: var(--success-500);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: drawCheck 0.5s var(--ease-out) 0.5s forwards;
}

@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

#confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--pearl) 25%, var(--silver) 50%, var(--pearl) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-xl);
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: calc(var(--space-6) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(400px, 90vw);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.3s var(--ease-spring);
}

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

.toast.success { border-color: var(--success-200); background: var(--success-50); }
.toast.error { border-color: var(--error-200); background: var(--error-50); }
.toast.warning { border-color: var(--warning-200); background: var(--warning-50); }

.toast .icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.toast .message {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(250, 251, 252, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.loader .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--silver);
  border-top-color: var(--primary-500);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

.loader .text {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-tertiary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: var(--space-6) var(--space-6) calc(var(--space-6) + var(--safe-bottom));
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   STEP ANIMATIONS
   ============================================ */
.step-content {
  animation: stepIn 0.4s var(--ease-out);
}

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

.step-content.exit {
  animation: stepOut 0.3s var(--ease-out) forwards;
}

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

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.admin-nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.nav-link {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all var(--duration-base) var(--ease-out);
}

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

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--ease-out);
}

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

.stat-card .label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card .change {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.stat-card .change.up { color: var(--success-600); }
.stat-card .change.down { color: var(--error-500); }

/* Data Table */
.data-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table th,
.data-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: var(--pearl);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

.data-table tr:hover td {
  background: var(--primary-50);
}

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

.data-table .actions {
  display: flex;
  gap: var(--space-2);
}

.data-table .action-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
}

.action-btn.view { background: var(--primary-50); color: var(--primary-600); }
.action-btn.edit { background: var(--warning-50); color: var(--warning-600); }
.action-btn.confirm { background: var(--success-50); color: var(--success-600); }
.action-btn.reject { background: var(--error-50); color: var(--error-500); }

.action-btn:hover {
  transform: translateY(-1px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.status-badge.pending { background: var(--warning-100); color: var(--warning-600); }
.status-badge.confirmed { background: var(--success-100); color: var(--success-600); }
.status-badge.rejected { background: var(--error-100); color: var(--error-500); }
.status-badge.enrolled { background: var(--success-100); color: var(--success-600); }
.status-badge.draft { background: var(--pearl); color: var(--text-muted); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95) translateY(16px);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  background: var(--pearl);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
  background: var(--error-50);
  color: var(--error-500);
}

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

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.page-btn {
  min-width: 40px;
  height: 40px;
  background: var(--pearl);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.page-btn:hover {
  background: var(--white);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.page-btn.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--white);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: all var(--duration-base) var(--ease-out);
}

.search-box:focus-within {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-focus);
}

.search-box .icon {
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  font-size: var(--text-base);
}

.search-box input:focus {
  outline: none;
}

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

.filter-select {
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-focus);
}

/* Empty State */
.empty-state {
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.empty-state .icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-5);
}

.empty-state .title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state .desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .header {
    padding: calc(var(--space-3) + var(--safe-top)) var(--space-4) var(--space-3);
  }

  .brand .name {
    display: none;
  }

  .main {
    padding: var(--space-4) var(--space-4) var(--space-10);
  }

  .card .inner {
    padding: var(--space-6);
  }

  .section-title {
    font-size: var(--text-xl);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .course-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .course-card .cover {
    width: 100%;
    height: 120px;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
  }

  .step-indicator {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-1);
  }

  .step-dot {
    width: 32px;
    height: 32px;
    font-size: var(--text-xs);
  }

  .step-line {
    width: 16px;
  }

  .payment-amount .value {
    font-size: var(--text-3xl);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   COURSE STATUS BADGES (Enrolled/Draft)
   ============================================ */
.course-card .course-status-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  z-index: 2;
}

.course-card .course-status-badge.enrolled {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.course-card .course-status-badge.draft {
  background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.course-card .course-status-badge.draft::after {
  content: ' - Resume';
}

.course-card.is-enrolled {
  border-color: var(--success-300);
  background: linear-gradient(135deg, var(--success-50), rgba(16, 185, 129, 0.05));
}

.course-card.is-enrolled:hover {
  border-color: var(--success-400);
  background: linear-gradient(135deg, var(--success-100), rgba(16, 185, 129, 0.1));
}

.course-card.is-draft {
  border-color: var(--warning-300);
  background: linear-gradient(135deg, var(--warning-50), rgba(245, 158, 11, 0.05));
}

.course-card.is-draft:hover {
  border-color: var(--warning-400);
  background: linear-gradient(135deg, var(--warning-100), rgba(245, 158, 11, 0.1));
}

/* ============================================
   ENROLLMENT CONFIRMATION CERTIFICATE
   ============================================ */
.confirmation-certificate {
  background: var(--white);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.cert-actions-header {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-bottom: 1px solid var(--primary-200);
}

.cert-printable {
  position: relative;
  padding: var(--space-10);
  background: var(--white);
  overflow: hidden;
}

.cert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.cert-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-brand {
  flex: 1;
  text-align: center;
}

.cert-brand h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-1);
}

.cert-brand p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  border-radius: var(--radius-xl);
  color: var(--white);
  flex-shrink: 0;
}

.cert-badge-icon {
  font-size: var(--text-2xl);
  font-weight: 700;
}

.cert-badge span:last-child {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
}

.cert-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.cert-divider-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-200), transparent);
}

.cert-divider-icon {
  font-size: var(--text-2xl);
}

.cert-title {
  text-align: center;
  margin-bottom: var(--space-8);
}

.cert-title h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.cert-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cert-section {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--pearl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
}

.cert-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.cert-section-icon {
  font-size: var(--text-lg);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.cert-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cert-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.cert-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.cert-course-box {
  text-align: center;
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--primary-50), rgba(99, 102, 241, 0.05));
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-xl);
}

.cert-course-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-700);
  margin-bottom: var(--space-2);
}

.cert-course-id {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cert-course-id span {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.cert-payment-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cert-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cert-payment-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.cert-payment-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.cert-payment-value.mono {
  font-family: var(--font-mono);
}

.cert-payment-row.discount .cert-payment-value {
  color: var(--success-600);
}

.cert-payment-row.total {
  padding: var(--space-3) 0;
  margin: var(--space-2) 0;
}

.cert-payment-row.total .cert-payment-label {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}

.cert-payment-row.total .cert-payment-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-600);
}

.cert-payment-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--primary-200), var(--success-200));
  border-radius: var(--radius-full);
}

.cert-message {
  text-align: center;
  padding: var(--space-8);
  margin: var(--space-8) 0;
  background: linear-gradient(135deg, var(--success-50), rgba(20, 184, 166, 0.05));
  border: 2px dashed var(--success-200);
  border-radius: var(--radius-2xl);
}

.cert-message-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

.cert-message h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--success-600);
  margin-bottom: var(--space-3);
}

.cert-message p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.cert-message strong {
  color: var(--primary-600);
}

.cert-message-sub {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--text-muted);
}

.cert-signature {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.cert-signature-box {
  text-align: center;
}

.cert-signature-line {
  width: 180px;
  height: 2px;
  background: var(--text-primary);
  margin-bottom: var(--space-3);
}

.cert-signature-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.cert-signature-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.cert-signature-company {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: var(--space-1);
}

.cert-seal {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.cert-seal-inner {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--primary-600);
}

.cert-seal-inner span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
}

.cert-seal-inner small {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: var(--tracking-wider);
}

.cert-footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-subtle);
}

.cert-footer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.cert-footer span {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.cert-footer-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  font-style: italic;
}

/* Decorative Corners */
.cert-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.cert-corner-tl {
  top: 20px;
  left: 20px;
  border-top: 3px solid var(--primary-300);
  border-left: 3px solid var(--primary-300);
  border-top-left-radius: var(--radius-lg);
}

.cert-corner-tr {
  top: 20px;
  right: 20px;
  border-top: 3px solid var(--primary-300);
  border-right: 3px solid var(--primary-300);
  border-top-right-radius: var(--radius-lg);
}

.cert-corner-bl {
  bottom: 20px;
  left: 20px;
  border-bottom: 3px solid var(--primary-300);
  border-left: 3px solid var(--primary-300);
  border-bottom-left-radius: var(--radius-lg);
}

.cert-corner-br {
  bottom: 20px;
  right: 20px;
  border-bottom: 3px solid var(--primary-300);
  border-right: 3px solid var(--primary-300);
  border-bottom-right-radius: var(--radius-lg);
}

.cert-actions {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--pearl);
  border-top: 1px solid var(--border-subtle);
}

.cert-actions .btn {
  flex: 1;
}

/* ============================================
   ADMIN CANDIDATE DETAIL WIDGETS
   ============================================ */
.candidate-detail-widget {
  padding: var(--space-6);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.candidate-header {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.candidate-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-4xl);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.candidate-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-info {
  flex: 1;
}

.candidate-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.candidate-email {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.candidate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.candidate-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.candidate-badge.course {
  background: var(--primary-100);
  color: var(--primary-700);
}

.candidate-badge.status {
  background: var(--success-100);
  color: var(--success-700);
}

.candidate-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.candidate-photo-card {
  background: var(--pearl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.candidate-photo-card .label {
  padding: var(--space-3);
  background: var(--white);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.candidate-photo-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--pearl);
}

.candidate-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.detail-item {
  padding: var(--space-3);
  background: var(--pearl);
  border-radius: var(--radius-lg);
}

.detail-item .label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}

.detail-item .value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  /* Hide non-printable elements */
  .fx-layer,
  .header,
  .footer,
  .btn-row,
  .step-indicator,
  .status-tracker,
  .info-box,
  .toast-container,
  .loading-overlay,
  .cert-actions-header,
  .cert-actions,
  .card:not(.confirmation-certificate),
  .admin-nav,
  .filter-bar,
  [onclick],
  button {
    display: none !important;
  }

  /* Reset page setup */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app {
    min-height: auto !important;
  }

  .main {
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
  }

  /* Certificate print styles */
  .confirmation-certificate {
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .cert-printable {
    padding: 40px !important;
    page-break-inside: avoid;
  }

  .cert-header {
    margin-bottom: 30px !important;
  }

  .cert-logo {
    width: 60px !important;
    height: 60px !important;
  }

  .cert-brand h1 {
    font-size: 24px !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: #4338ca !important;
  }

  .cert-badge {
    padding: 10px 15px !important;
  }

  .cert-section {
    background: #f4f6f8 !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    break-inside: avoid;
  }

  .cert-grid {
    gap: 15px !important;
  }

  .cert-course-box {
    background: #eef2ff !important;
    padding: 20px !important;
  }

  .cert-message {
    background: #ecfdf5 !important;
    padding: 30px !important;
    margin: 30px 0 !important;
  }

  .cert-signature {
    margin-top: 40px !important;
    padding-top: 30px !important;
  }

  .cert-seal {
    width: 70px !important;
    height: 70px !important;
  }

  .cert-seal-inner {
    width: 50px !important;
    height: 50px !important;
  }

  .cert-corner {
    display: block !important;
    border-width: 2px !important;
  }

  .cert-footer {
    margin-top: 30px !important;
    padding-top: 20px !important;
  }

  @page {
    size: A4;
    margin: 15mm;
  }
}

/* ============================================
   COURSE SELECTION BANNER
   Shows when course is auto-selected from URL
   ============================================ */
.course-selection-banner {
  background: linear-gradient(135deg, var(--success-50) 0%, var(--primary-50) 100%);
  border: 2px solid var(--success-500);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
}

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

.course-selection-banner .banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.course-selection-banner .banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--success-500);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.course-selection-banner .banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-selection-banner .banner-text strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--success-600);
}

.course-selection-banner .banner-text span {
  font-size: 16px;
  font-weight: 600;
  color: var(--graphite);
}

.course-selection-banner .banner-change {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--success-500);
  border-radius: var(--radius-md);
  color: var(--success-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.course-selection-banner .banner-change:hover {
  background: var(--success-500);
  color: white;
}

@media (max-width: 600px) {
  .course-selection-banner .banner-content {
    flex-wrap: wrap;
  }

  .course-selection-banner .banner-change {
    width: 100%;
    margin-top: 8px;
  }
}

/* ============================================
   DRAFT SELECTION MODAL
   ============================================ */
#draftModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.draft-modal {
  background: var(--white);
  border-radius: var(--radius-2xl);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.draft-modal .modal-header {
  padding: 28px 28px 20px;
  text-align: center;
  border-bottom: 1px solid var(--silver);
}

.draft-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--void);
  margin: 0 0 8px;
}

.draft-modal .modal-header p {
  font-size: 14px;
  color: var(--storm);
  margin: 0;
}

.draft-list {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.draft-item {
  background: var(--snow);
  border: 2px solid var(--silver);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.draft-item:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.draft-item.enrolled {
  border-color: var(--success-500);
  background: var(--success-50);
  cursor: default;
}

.draft-item.payment-pending {
  border-color: var(--warning-500);
  background: var(--warning-50);
}

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

.draft-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--void);
  display: flex;
  align-items: center;
  gap: 8px;
}

.draft-item-title .icon {
  font-size: 18px;
}

.draft-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.draft-status-badge.draft {
  background: var(--primary-100);
  color: var(--primary-700);
}

.draft-status-badge.awaiting {
  background: var(--warning-100);
  color: var(--warning-600);
}

.draft-status-badge.pending {
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100, #ccfbf1));
  color: var(--primary-700);
}

.draft-status-badge.enrolled {
  background: var(--success-100);
  color: var(--success-600);
}

.draft-item-meta {
  font-size: 13px;
  color: var(--storm);
  margin-bottom: 12px;
}

.draft-item-meta span {
  margin-right: 12px;
}

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

.draft-item-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: var(--radius-lg);
}

.draft-item-actions .btn.resume {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  border: none;
}

.draft-item-actions .btn.resume:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.draft-item-actions .btn.archive {
  background: transparent;
  color: var(--storm);
  border: 1px solid var(--mist);
}

.draft-item-actions .btn.archive:hover {
  background: var(--error-50);
  color: var(--error-600);
  border-color: var(--error-200);
}

.draft-item-actions .btn.view {
  background: var(--success-500);
  color: white;
  border: none;
}

.draft-modal .modal-footer {
  padding: 16px 28px 28px;
  border-top: 1px solid var(--silver);
  text-align: center;
}

.draft-modal .modal-footer .btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}

/* Archive confirmation */
.archive-confirm {
  background: var(--error-50);
  border: 2px solid var(--error-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 8px;
}

.archive-confirm p {
  font-size: 13px;
  color: var(--error-600);
  margin: 0 0 12px;
}

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

.archive-confirm-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 500px) {
  .draft-modal {
    max-height: 90vh;
    border-radius: var(--radius-xl);
  }

  .draft-modal .modal-header {
    padding: 20px 20px 16px;
  }

  .draft-modal .modal-header h2 {
    font-size: 20px;
  }

  .draft-list {
    padding: 12px;
    max-height: 350px;
  }

  .draft-item {
    padding: 14px;
  }

  .draft-item-actions {
    flex-direction: column;
  }

  .draft-modal .modal-footer {
    padding: 12px 20px 20px;
  }
}

/* ============================================
   INLINE DRAFT SELECTION (Replaces Modal)
   ============================================ */

.draft-list-inline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.draft-item-inline {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.2s ease;
}

.draft-item-inline:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.draft-item-inline.enrolled {
  border-color: var(--success-500);
  background: linear-gradient(135deg, var(--success-50), var(--white));
}

.draft-item-inline.confirmed {
  border-color: var(--success-500);
  background: linear-gradient(135deg, var(--success-50), var(--white));
}

.draft-item-inline.pending {
  border-color: var(--warning-500);
  background: linear-gradient(135deg, var(--warning-50), var(--white));
}

.draft-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.draft-inline-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.draft-inline-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.draft-inline-details {
  flex: 1;
  min-width: 0;
}

.draft-inline-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-inline-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.status-pill.enrolled {
  background: var(--success-100);
  color: var(--success-600);
}

.status-pill.confirmed {
  background: var(--success-100);
  color: var(--success-600);
}

.status-pill.pending {
  background: var(--warning-100);
  color: var(--warning-600);
}

.status-pill.awaiting {
  background: var(--primary-100);
  color: var(--primary-600);
}

.status-pill.draft {
  background: var(--pearl);
  color: var(--storm);
}

/* Inline Action Buttons */
.draft-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  flex: 1;
}

.btn-inline.primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
}

.btn-inline.primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-inline.ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-inline.ghost:hover {
  background: var(--pearl);
  border-color: var(--border-strong);
}

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

.btn-inline.danger:hover {
  background: var(--error-600);
}

/* Archive Confirm Inline */
.archive-confirm-inline {
  margin-top: 12px;
  padding: 12px;
  background: var(--error-50);
  border-radius: 10px;
  border: 1px solid var(--error-100);
}

.archive-confirm-inline p {
  font-size: var(--text-sm);
  color: var(--error-600);
  margin: 0 0 12px 0;
  text-align: center;
}

.archive-confirm-btns {
  display: flex;
  gap: 8px;
}

.archive-confirm-btns .btn-inline {
  flex: 1;
}

/* Divider */
.draft-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

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

.draft-divider span {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Start Fresh Button */
.btn-start-fresh {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-start-fresh:hover {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
}

.btn-start-fresh .icon {
  font-size: 1.2em;
}

.btn-start-fresh .arrow {
  margin-left: auto;
  font-size: 1.2em;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.btn-start-fresh:hover .arrow {
  transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .draft-item-inline {
    padding: 14px;
  }

  .draft-inline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .draft-inline-info {
    width: 100%;
  }

  .status-pill {
    align-self: flex-start;
  }

  .draft-inline-actions {
    flex-direction: column;
  }

  .btn-inline {
    width: 100%;
  }

  .btn-start-fresh {
    padding: 14px 20px;
  }
}
/* ============================================
   UNIVERSAL NAVIGATION
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  transition: color var(--duration-base) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  transition: width var(--duration-base) var(--ease-out);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.desktop-nav {
  display: flex;
}

/* Desktop Auth Nav */
.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-4);
}

.nav-auth .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-400);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.nav-auth .user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.user-menu-container {
  position: relative;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  min-width: 180px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.user-menu a:hover,
.user-menu button:hover {
  background: #f1f5f9;
}

.user-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

.user-menu svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-container {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: var(--white);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-overlay.active .mobile-nav-container {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-header .brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.mobile-nav-header .brand .logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mobile-nav-header .brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-nav-header .brand .name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.mobile-close-btn:hover {
  background: var(--primary-100);
  color: var(--primary-600);
}

/* Mobile User Profile */
.mobile-user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--primary-50, #f0f9ff) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary-500);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mobile-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-user-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-user-status {
  font-size: var(--text-xs);
  color: var(--primary-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile Nav Links */
.mobile-nav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) 0;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease-out);
  border-left: 3px solid transparent;
}

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

.mobile-nav-link.active {
  background: var(--primary-50, #f0f9ff);
  color: var(--primary-600);
  border-left-color: var(--primary-500);
}

.mobile-nav-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s;
}

.mobile-nav-link:hover svg,
.mobile-nav-link.active svg {
  color: var(--primary-500);
}

/* Mobile Nav Footer */
.mobile-nav-footer {
  padding: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.mobile-logout-section .btn {
  gap: var(--space-2);
}

.full-width {
  width: 100%;
}

/* ============================================
   PREMIUM FOOTER
   ============================================ */
.premium-footer {
  background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
  padding: 0;
  margin-top: var(--space-16);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid #262626;
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

/* Footer Brand Section */
.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: opacity 0.2s;
}

.footer-brand:hover {
  opacity: 0.9;
}

.footer-brand .logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--primary-500);
}

.footer-brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-brand .name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
}

.premium-footer .footer-tagline {
  font-size: var(--text-sm);
  color: #94a3b8;
  line-height: var(--leading-relaxed);
  max-width: 280px;
}

/* Footer Social Links */
.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #262626;
  border-radius: var(--radius-lg);
  color: #e2e8f0;
  transition: all 0.2s var(--ease-out);
}

.social-link:hover {
  background: var(--primary-500);
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* Footer Links Grid */
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 640px) {
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

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

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-500);
  margin-bottom: var(--space-2);
}

.footer-col a {
  font-size: var(--text-sm);
  color: #94a3b8;
  transition: all 0.2s;
  padding: var(--space-1) 0;
}

.footer-col a:hover {
  color: #fff;
  padding-left: var(--space-2);
}

/* Footer Bottom */
.premium-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .premium-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

.premium-footer .footer-bottom p {
  font-size: var(--text-sm);
  color: #64748b;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================
   LANGUAGE TOGGLE
   ============================================ */
.lang-toggle-container {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: var(--space-4);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.lang-toggle:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary-300);
}

.lang-toggle .lang-option {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-weight: 500;
}

.lang-toggle .lang-divider {
  color: var(--text-muted);
  font-weight: 300;
}

/* Active state - Bangla */
.lang-toggle.bn .lang-option[data-lang="bn"] {
  background: var(--primary-500);
  color: #fff;
}

.lang-toggle.bn .lang-option[data-lang="en"] {
  color: var(--text-muted);
}

/* Active state - English */
.lang-toggle.en .lang-option[data-lang="en"] {
  background: var(--primary-500);
  color: #fff;
}

.lang-toggle.en .lang-option[data-lang="bn"] {
  color: var(--text-muted);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lang-toggle-container {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
  
  .lang-toggle {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
  }
  
  .lang-toggle .lang-option {
    padding: 2px 6px;
  }
}

/* ============================================
   EDIT DETAILS SECTION
   ============================================ */
.edit-details-section {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.edit-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-interactive);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg);
  color: var(--primary-600);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: var(--primary-100);
  border-color: var(--primary-300);
}

.btn-edit:disabled,
.btn-edit.locked {
  background: var(--bg-tertiary);
  border-color: var(--border-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-edit svg {
  width: 16px;
  height: 16px;
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  padding: var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.detail-item .label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.detail-item .value {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 500;
}

.detail-item.full-width {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .detail-item.full-width {
    grid-column: span 1;
  }
}

/* Locked Notice */
.locked-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--warning-50), transparent);
  border: 1px solid var(--warning-500);
  border-radius: var(--radius-xl);
  margin-top: var(--space-4);
}

.locked-notice .icon {
  font-size: var(--text-xl);
}

.locked-notice .content {
  flex: 1;
}

.locked-notice .title {
  font-weight: 600;
  color: var(--warning-600);
  margin-bottom: var(--space-1);
}

.locked-notice .text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Edit Mode */
.edit-mode .form-input {
  background: var(--white);
  border-color: var(--primary-300);
}

.edit-mode .btn-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* ========================================
   ADMIN ENROLLMENT IMPROVEMENTS
   ======================================== */

/* Free Enrollment Badge */
.status-badge.free {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  animation: pulse-free 2s infinite;
}

@keyframes pulse-free {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.status-badge.free-status {
  border: 2px solid currentColor;
}

/* Highlight row for quick-approve */
.data-table .highlight-row {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent);
}

.data-table .highlight-row:hover td {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.05));
}

/* Action button improvements */
.action-btn.confirm {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.action-btn.confirm:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

/* Better mobile responsiveness for admin */
@media (max-width: 900px) {
  .admin-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--space-2);
  }

  .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    white-space: nowrap;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

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

  .stat-card {
    padding: var(--space-4);
  }

  .stat-card .value {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {
  /* Responsive table layout */
  .data-table-wrap {
    border-radius: var(--radius-xl);
  }

  .data-table th,
  .data-table td {
    padding: var(--space-3) var(--space-2);
    font-size: var(--text-xs);
  }

  .data-table .actions {
    flex-direction: column;
    gap: var(--space-1);
  }

  .data-table .action-btn {
    padding: var(--space-2);
    font-size: 10px;
    width: 100%;
    text-align: center;
  }

  /* Hide less important columns on mobile */
  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(6),
  .data-table td:nth-child(6) {
    display: none;
  }

  .filter-bar {
    flex-direction: column;
    gap: var(--space-3);
  }

  .filter-bar .search-box,
  .filter-bar .filter-select {
    width: 100%;
  }

  /* Modal improvements */
  .modal-overlay {
    padding: var(--space-3);
    align-items: flex-end;
  }

  .modal {
    max-height: 85vh;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    margin-bottom: 0;
  }

  .modal-header {
    padding: var(--space-4);
  }

  .modal-body {
    padding: var(--space-4);
  }

  .modal-footer {
    padding: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .modal-footer .btn {
    flex: 1 1 auto;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-header h1 {
    font-size: var(--text-xl);
  }

  /* Card layout for very small screens */
  .data-table {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
  }

  .data-table tr {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
  }

  .data-table tr.highlight-row {
    border-color: var(--success-300);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-light);
  }

  .data-table td:before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    margin-right: var(--space-3);
  }

  .data-table td:last-child {
    border-bottom: none;
    padding-top: var(--space-3);
    margin-top: var(--space-2);
  }

  .data-table td:nth-child(3),
  .data-table td:nth-child(6) {
    display: flex;
  }

  .data-table .actions {
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
  }

  .data-table .action-btn {
    flex: 1;
    max-width: 100px;
  }

  /* Candidate detail widget mobile */
  .candidate-detail-widget .candidate-header {
    flex-direction: column;
    text-align: center;
  }

  .candidate-detail-widget .candidate-info {
    width: 100%;
  }

  .candidate-details-grid {
    grid-template-columns: 1fr !important;
  }

  .candidate-photos {
    grid-template-columns: 1fr !important;
  }
}

/* Quick action bar for pending approvals */
.quick-action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--success-200);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
}

.quick-action-bar .icon {
  font-size: var(--text-2xl);
}

.quick-action-bar .content {
  flex: 1;
}

.quick-action-bar .count {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--success-600);
}

.quick-action-bar .label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Warning badge for pending reviews */
.status-badge.warning {
  background: var(--warning-100);
  color: var(--warning-700);
}
