/* ═══════════════════════════════════════════════════════════════
   BIGMAN ACADEMIC SERVICES — Learning Hub CSS
   Design: Ultra-Premium Glassmorphism · Deep Navy · Royal Blue
   Fonts: Instrument Serif (display) + Plus Jakarta Sans (body)
   Matches main Bigman Academic Services brand exactly
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ─── BIGMAN BRAND TOKENS ──────────────────────────────────── */
:root {
  /* Brand Palette — exact Bigman colors */
  --primary:        #1a4fa0;
  --primary-dark:   #0d2d5e;
  --primary-mid:    #2361c8;
  --primary-deep:   #071835;
  --primary-light:  rgba(26,79,160,.10);
  --primary-glow:   rgba(26,79,160,.32);

  --accent:         #4f8ef7;
  --accent-2:       #6ea8fe;
  --accent-light:   rgba(79,142,247,.13);
  --accent-subtle:  rgba(79,142,247,.07);

  --success:        #059669;
  --danger:         #dc2626;
  --warning:        #d97706;
  --info:           #0284c7;

  /* Light Mode Surface */
  --bg:              #f0f4fd;
  --bg-deep:         #e4eaf8;
  --bg-card:         rgba(255,255,255,0.96);
  --bg-glass:        rgba(255,255,255,0.72);
  --bg-glass-strong: rgba(255,255,255,0.88);
  --bg-glass-dark:   rgba(255,255,255,0.42);
  --bg-nav:          rgba(255,255,255,0.92);
  --bg-sidebar:      rgba(255,255,255,0.95);
  --bg-overlay:      rgba(26,79,160,.04);

  --text-primary:   #08122a;
  --text-secondary: #374469;
  --text-muted:     #6b7fa8;
  --text-inverse:   #ffffff;

  --border:         rgba(26,79,160,.14);
  --border-subtle:  rgba(26,79,160,.07);
  --border-strong:  rgba(26,79,160,.26);

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(8,18,42,.07);
  --shadow-sm:   0 2px 14px rgba(8,18,42,.09), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md:   0 6px 32px rgba(8,18,42,.12), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg:   0 16px 56px rgba(8,18,42,.16), 0 4px 16px rgba(0,0,0,.07);
  --shadow-xl:   0 28px 80px rgba(8,18,42,.20), 0 8px 24px rgba(0,0,0,.09);
  --shadow-glow: 0 0 56px rgba(26,79,160,.32);
  --shadow-card: 0 12px 48px rgba(8,18,42,.14);
  --shadow-blue: 0 8px 40px rgba(26,79,160,.28);
  --shadow-inset:inset 0 1.5px 0 rgba(255,255,255,.80),inset 0 -1px 0 rgba(26,79,160,.06);

  /* Glassmorphism */
  --glass-blur:    blur(28px) saturate(190%);
  --glass-blur-md: blur(18px) saturate(170%);
  --glass-blur-sm: blur(12px) saturate(150%);

  /* Radii */
  --r-xs: 4px; --r-sm: 8px; --r-md: 14px;
  --r-lg: 22px; --r-xl: 32px; --r-full: 9999px;

  /* Typography */
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Transitions */
  --tr:        0.28s cubic-bezier(.4,0,.2,1);
  --tr-fast:   0.14s cubic-bezier(.4,0,.2,1);
  --tr-slow:   0.48s cubic-bezier(.4,0,.2,1);
  --tr-spring: 0.36s cubic-bezier(.34,1.56,.64,1);

  /* Layout */
  --sidebar-w: 268px;
  --header-h:  64px;

  /* Gradients */
  --grad-primary:  linear-gradient(145deg, #1a4fa0 0%, #0d2d5e 100%);
  --grad-hero:     linear-gradient(160deg, #040e24 0%, #0a1e52 40%, #142c7a 75%, #1a4fa0 100%);
  --grad-glass:    linear-gradient(140deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.06) 100%);
  --grad-accent:   linear-gradient(135deg, #4f8ef7 0%, #6ea8fe 50%, #2361c8 100%);
  --grad-mesh:     radial-gradient(ellipse at 20% 50%, rgba(26,79,160,.12) 0%, transparent 60%),
                   radial-gradient(ellipse at 80% 20%, rgba(79,142,247,.08) 0%, transparent 50%);
}

/* ─── DARK MODE ──────────────────────────────────────────────── */
html[data-theme="dark"] {
  --bg:              #050d1e;
  --bg-deep:         #030810;
  --bg-card:         rgba(10,18,45,.95);
  --bg-glass:        rgba(10,18,45,.75);
  --bg-glass-strong: rgba(14,22,52,.88);
  --bg-glass-dark:   rgba(6,12,32,.92);
  --bg-nav:          rgba(5,13,30,.94);
  --bg-sidebar:      rgba(7,14,34,.97);
  --bg-overlay:      rgba(26,79,160,.10);

  --text-primary:   #dde6fa;
  --text-secondary: #7b96cc;
  --text-muted:     #3f5475;

  --border:        rgba(79,142,247,.16);
  --border-subtle: rgba(79,142,247,.07);
  --border-strong: rgba(79,142,247,.28);

  --shadow-xs:   0 1px 4px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 14px rgba(0,0,0,.5);
  --shadow-md:   0 6px 32px rgba(0,0,0,.56);
  --shadow-lg:   0 16px 56px rgba(0,0,0,.64);
  --shadow-xl:   0 28px 80px rgba(0,0,0,.70);
  --shadow-glow: 0 0 64px rgba(26,79,160,.55);
  --shadow-card: 0 12px 48px rgba(0,0,0,.60);
  --shadow-blue: 0 8px 40px rgba(79,142,247,.20);
  --shadow-inset:inset 0 1.5px 0 rgba(255,255,255,.07),inset 0 -1px 0 rgba(0,0,0,.14);

  --primary-light:  rgba(26,79,160,.24);
  --grad-glass:     linear-gradient(140deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.02) 100%);
  --accent-light:   rgba(79,142,247,.20);
  --accent-subtle:  rgba(79,142,247,.12);
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--tr), color var(--tr);
}
img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: rgba(79,142,247,.22); color: var(--text-primary); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(26,79,160,.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.bm-hub-wrap {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.bm-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--tr);
}
.bm-sidebar::-webkit-scrollbar { width: 3px; }

/* Sidebar Brand */
.bm-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 0;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.bm-sidebar-logo {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  object-fit: contain;
  flex-shrink: 0;
}
.bm-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.bm-sidebar-brand-main {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.bm-sidebar-brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}
.bm-sidebar-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--grad-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--r-full);
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: .04em;
}

/* Sidebar Nav */
.bm-nav {
  padding: 8px 12px;
  flex: 1;
}
.bm-nav-section {
  margin-bottom: 4px;
}
.bm-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 10px 6px;
}
.bm-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--tr-fast);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
  text-decoration: none;
}
.bm-nav-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--tr-fast);
}
.bm-nav-link:hover,
.bm-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.bm-nav-link.active { font-weight: 600; }
.bm-nav-link.active i,
.bm-nav-link:hover i { color: var(--primary); }
.bm-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.bm-nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

/* Sidebar User */
.bm-sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}
.bm-sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-blue);
}
.bm-sidebar-user-info { flex: 1; min-width: 0; }
.bm-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}
.bm-sidebar-logout {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--tr-fast);
  flex-shrink: 0;
}
.bm-sidebar-logout:hover { background: rgba(220,38,38,.1); color: var(--danger); }

/* Main Content */
.bm-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header */
.bm-topbar {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: var(--bg-nav);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  z-index: 100;
}
.bm-topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.bm-topbar-title span {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--primary);
}
.bm-topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Theme Toggle */
.bm-theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--tr-fast);
}
.bm-theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* Mobile menu toggle */
.bm-menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Back to site button */
.bm-back-site {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--tr-fast);
  white-space: nowrap;
}
.bm-back-site:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── CONTENT AREA ───────────────────────────────────────────── */
.bm-content { padding: 32px; flex: 1; }

/* ─── PAGE TITLE ──────────────────────────────────────────────── */
.bm-page-header {
  margin-bottom: 28px;
}
.bm-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.2;
}
.bm-page-header h1 strong {
  font-style: normal;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--primary);
}
.bm-page-header p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-top: 6px;
}

/* ─── STAT CARDS ─────────────────────────────────────────────── */
.bm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.bm-stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr);
}
.bm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.bm-stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.bm-stat-icon.success { background: rgba(5,150,105,.12); }
.bm-stat-icon.warning { background: rgba(217,119,6,.12); }
.bm-stat-icon.info    { background: rgba(2,132,199,.12); }
.bm-stat-body { flex: 1; min-width: 0; }
.bm-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.bm-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.bm-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.bm-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bm-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.bm-card-title i { color: var(--primary); }
.bm-card-body { padding: 22px; }

/* ─── GRID ───────────────────────────────────────────────────── */
.bm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bm-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.bm-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ─── COURSE CARDS ───────────────────────────────────────────── */
.bm-course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--tr);
  display: flex;
  flex-direction: column;
}
.bm-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.bm-course-cover {
  height: 120px;
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
  overflow: hidden;
}
.bm-course-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-mesh);
  opacity: .6;
}
.bm-course-cover-icon { position: relative; z-index: 1; }
.bm-course-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.bm-course-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 6px;
}
.bm-course-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  flex: 1;
}
.bm-course-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.bm-course-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.bm-course-meta i { color: var(--primary); }
.bm-progress-bar {
  height: 5px;
  background: var(--bg-deep);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 14px;
}
.bm-progress-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: var(--r-full);
  transition: width 0.6s var(--tr);
}
.bm-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--tr-fast);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
  box-shadow: var(--shadow-inset);
}
.bm-btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-blue), var(--shadow-inset);
}
.bm-btn-primary:hover {
  background: linear-gradient(145deg, #2361c8 0%, #1a4fa0 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}
.bm-btn-accent {
  background: var(--grad-accent);
  color: #fff;
}
.bm-btn-accent:hover { transform: translateY(-1px); opacity: .92; }
.bm-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.bm-btn-outline:hover { background: var(--primary-light); }
.bm-btn-ghost {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: none;
}
.bm-btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.bm-btn-danger {
  background: linear-gradient(145deg, #dc2626, #b91c1c);
  color: #fff;
}
.bm-btn-danger:hover { opacity: .9; }
.bm-btn-sm { padding: 6px 14px; font-size: 12px; }
.bm-btn-lg { padding: 13px 28px; font-size: 15px; }
.bm-btn-full { width: 100%; }
.bm-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ─── FORMS ──────────────────────────────────────────────────── */
.bm-form-group { margin-bottom: 18px; }
.bm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.bm-label .required { color: var(--danger); margin-left: 2px; }
.bm-input,
.bm-select,
.bm-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
  outline: none;
  font-family: var(--font-body);
}
.bm-input:focus,
.bm-select:focus,
.bm-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,79,160,.12);
  background: var(--bg-card);
}
.bm-textarea { resize: vertical; min-height: 100px; }
.bm-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.bm-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ─── TABLES ─────────────────────────────────────────────────── */
.bm-table-wrap { overflow-x: auto; }
.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.bm-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.bm-table td {
  padding: 12px 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.bm-table tr:last-child td { border-bottom: none; }
.bm-table tr:hover td { background: var(--bg-overlay); }

/* ─── BADGES ─────────────────────────────────────────────────── */
.bm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.bm-badge-blue    { background: var(--accent-light);       color: var(--primary); }
.bm-badge-green   { background: rgba(5,150,105,.12);        color: var(--success); }
.bm-badge-yellow  { background: rgba(217,119,6,.12);        color: var(--warning); }
.bm-badge-red     { background: rgba(220,38,38,.12);        color: var(--danger); }
.bm-badge-grey    { background: var(--bg-deep);             color: var(--text-muted); }
.bm-badge-primary { background: var(--primary);             color: #fff; }

/* ─── ALERTS ─────────────────────────────────────────────────── */
.bm-alert {
  padding: 13px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.bm-alert i { flex-shrink: 0; margin-top: 1px; }
.bm-alert-success { background: rgba(5,150,105,.10); border-color: rgba(5,150,105,.25); color: #065f46; }
.bm-alert-error   { background: rgba(220,38,38,.09); border-color: rgba(220,38,38,.22); color: #991b1b; }
.bm-alert-info    { background: var(--accent-light);  border-color: var(--border);        color: var(--primary-mid); }
.bm-alert-warning { background: rgba(217,119,6,.09);  border-color: rgba(217,119,6,.22);  color: #92400e; }
html[data-theme="dark"] .bm-alert-success { color: #6ee7b7; }
html[data-theme="dark"] .bm-alert-error   { color: #fca5a5; }
html[data-theme="dark"] .bm-alert-info    { color: var(--accent-2); }
html[data-theme="dark"] .bm-alert-warning { color: #fcd34d; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.bm-empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}
.bm-empty-icon { font-size: 44px; margin-bottom: 14px; opacity: .45; }
.bm-empty h3 { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.bm-empty p  { font-size: 14px; max-width: 320px; margin: 0 auto 18px; }

/* ─── LOGIN SPLIT ─────────────────────────────────────────────── */
.bm-login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}
.bm-login-left {
  flex: 1;
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}
.bm-login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-mesh);
  pointer-events: none;
}
.bm-login-hero-logo {
  width: 80px; height: 80px;
  object-fit: contain;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  filter: drop-shadow(0 8px 24px rgba(79,142,247,.4));
  position: relative; z-index: 1;
}
.bm-login-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-style: italic;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.bm-login-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,.72);
  text-align: center;
  line-height: 1.6;
  max-width: 380px;
  position: relative; z-index: 1;
}
.bm-login-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  position: relative; z-index: 1;
}
.bm-login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.85);
  font-size: 14.5px;
}
.bm-login-feature i {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: rgba(79,142,247,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  color: var(--accent-2);
}
.bm-login-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 48px;
  background: var(--bg-card);
}
.bm-login-box { width: 100%; max-width: 380px; }
.bm-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.bm-login-brand img { width: 40px; height: 40px; object-fit: contain; }
.bm-login-brand-name { font-weight: 700; font-size: 16px; color: var(--text-primary); }
.bm-login-box h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.bm-login-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.bm-divider {
  text-align: center;
  position: relative;
  margin: 18px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.bm-divider::before, .bm-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.bm-divider::before { left: 0; }
.bm-divider::after  { right: 0; }

/* ─── LESSON VIEWER ──────────────────────────────────────────── */
.bm-course-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  min-height: calc(100vh - var(--header-h));
}
.bm-lesson-main { padding: 28px 32px; }
.bm-lesson-sidebar {
  border-left: 1px solid var(--border);
  background: var(--bg-sidebar);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 18px 0;
}
.bm-lesson-sidebar::-webkit-scrollbar { width: 3px; }
.bm-lesson-list-title {
  padding: 0 18px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.bm-lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background var(--tr-fast);
  border-left: 2px solid transparent;
  font-size: 13px;
}
.bm-lesson-item:hover { background: var(--bg-overlay); }
.bm-lesson-item.active {
  background: var(--primary-light);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.bm-lesson-item.done .bm-lesson-check { color: var(--success); }
.bm-lesson-check {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
  color: transparent;
  transition: all var(--tr-fast);
}
.bm-lesson-item.done .bm-lesson-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.bm-lesson-name { flex: 1; line-height: 1.3; }
.bm-lesson-mins { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.bm-video-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
  aspect-ratio: 16/9;
}
.bm-video-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.bm-lesson-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  line-height: 1.8;
  color: var(--text-primary);
  font-size: 15px;
}
.bm-lesson-content h2,
.bm-lesson-content h3 { margin: 20px 0 10px; color: var(--primary-dark); }
.bm-lesson-content p  { margin-bottom: 14px; }
.bm-lesson-content ul,
.bm-lesson-content ol { margin: 10px 0 14px 22px; }
.bm-lesson-content li { margin-bottom: 6px; }

/* ─── TUTORING VIEW ──────────────────────────────────────────── */
.bm-session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-xs);
  transition: all var(--tr);
}
.bm-session-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.bm-session-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  flex-shrink: 0;
}
.bm-session-info { flex: 1; min-width: 0; }
.bm-session-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.bm-session-meta { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.bm-session-meta i { color: var(--primary); }

/* ─── CERTIFICATE ─────────────────────────────────────────────── */
.bm-cert-card {
  background: var(--grad-hero);
  border-radius: var(--r-xl);
  padding: 40px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.bm-cert-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-mesh); opacity: .5;
}
.bm-cert-card > * { position: relative; z-index: 1; }
.bm-cert-seal { font-size: 52px; margin-bottom: 14px; }
.bm-cert-title { font-family: var(--font-display); font-size: 28px; font-style: italic; margin-bottom: 8px; }
.bm-cert-name  { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.bm-cert-course{ font-size: 14px; opacity: .8; margin-bottom: 20px; }
.bm-cert-no    { font-size: 12px; opacity: .6; font-family: monospace; }

/* ─── MANAGE FORMS ───────────────────────────────────────────── */
.bm-manage-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.bm-manage-tab {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tr-fast);
}
.bm-manage-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.bm-manage-tab:hover  { color: var(--primary); }

/* ─── TUTOR CARDS ─────────────────────────────────────────────── */
.bm-tutor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: all var(--tr);
}
.bm-tutor-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-2px); }
.bm-tutor-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-blue);
}
.bm-tutor-info { flex: 1; min-width: 0; }
.bm-tutor-name { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.bm-tutor-headline { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.bm-tutor-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.bm-tutor-rating { color: #f59e0b; }
.bm-tutor-rate { color: var(--success); font-weight: 600; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.bm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--tr);
}
.bm-modal-overlay.open { opacity: 1; pointer-events: all; }
.bm-modal {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
  width: 100%; max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--tr);
}
.bm-modal-overlay.open .bm-modal { transform: translateY(0); }
.bm-modal-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.bm-modal-title { font-size: 17px; font-weight: 700; }
.bm-modal-close {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--tr-fast);
}
.bm-modal-close:hover { background: var(--bg-deep); color: var(--text-primary); }
.bm-modal-body { padding: 0 24px 24px; }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.bm-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 20px 0;
}
.bm-page-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--tr-fast);
}
.bm-page-btn:hover,
.bm-page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.bm-page-btn[disabled] { opacity: .4; cursor: default; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .bm-course-layout { grid-template-columns: 1fr; }
  .bm-lesson-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
@media (max-width: 900px) {
  .bm-sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .bm-sidebar.open { transform: translateX(0); }
  .bm-main { margin-left: 0; }
  .bm-menu-toggle { display: flex; }
  .bm-login-left { display: none; }
  .bm-login-right { width: 100%; padding: 32px 24px; }
  .bm-grid-2, .bm-grid-3 { grid-template-columns: 1fr; }
  .bm-content { padding: 20px; }
}
@media (max-width: 640px) {
  .bm-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bm-topbar { padding: 0 16px; }
}
@media (max-width: 400px) {
  .bm-stats-grid { grid-template-columns: 1fr; }
}

/* ─── SIDEBAR OVERLAY (mobile) ───────────────────────────────── */
.bm-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.bm-sidebar-overlay.open { display: block; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.bm-mt-4  { margin-top: 16px; }
.bm-mt-6  { margin-top: 24px; }
.bm-mt-8  { margin-top: 32px; }
.bm-mb-4  { margin-bottom: 16px; }
.bm-mb-6  { margin-bottom: 24px; }
.bm-flex  { display: flex; }
.bm-flex-center { display: flex; align-items: center; }
.bm-flex-between { display: flex; align-items: center; justify-content: space-between; }
.bm-gap-2  { gap: 8px; }
.bm-gap-3  { gap: 12px; }
.bm-gap-4  { gap: 16px; }
.bm-gap-6  { gap: 24px; }
.bm-text-muted { color: var(--text-muted); }
.bm-text-sm    { font-size: 12.5px; }
.bm-font-bold  { font-weight: 700; }
.bm-hidden     { display: none !important; }

/* ─── LOADING SPINNER ────────────────────────────────────────── */
.bm-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: bm-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes bm-spin { to { transform: rotate(360deg); } }

/* ─── FLASH MESSAGES ─────────────────────────────────────────── */
#bm-flash { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.bm-toast {
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur-sm);
  display: flex; align-items: center; gap: 9px;
  animation: bm-toast-in 0.3s var(--tr-spring) forwards;
}
.bm-toast.success { border-color: var(--success); color: var(--success); }
.bm-toast.error   { border-color: var(--danger);  color: var(--danger); }
.bm-toast.info    { border-color: var(--primary);  color: var(--primary); }
@keyframes bm-toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ─── BRAND HEADER GRADIENT STRIP ───────────────────────────── */
.bm-header-strip {
  height: 3px;
  background: var(--grad-accent);
  position: absolute;
  bottom: -1px; left: 0; right: 0;
}

/* ─── HERO BANNER (Dashboard) ────────────────────────────────── */
.bm-hero-banner {
  background: var(--grad-hero);
  border-radius: var(--r-xl);
  padding: 36px 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.bm-hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-mesh);
  pointer-events: none;
}
.bm-hero-banner > * { position: relative; z-index: 1; }
.bm-hero-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-style: italic;
  margin-bottom: 8px;
  color: #fff;
}
.bm-hero-banner p { font-size: 15px; opacity: .8; max-width: 460px; margin-bottom: 20px; }
.bm-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-hero-actions .bm-btn {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
}
.bm-hero-actions .bm-btn:hover { background: rgba(255,255,255,.28); }
.bm-hero-actions .bm-btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.bm-hero-actions .bm-btn-primary:hover { background: rgba(255,255,255,.9); }

/* ═══════════════════════════════════════════════════════════════
   BIGMAN LMS — DESIGN ENHANCEMENTS (2026-07-30)
   Premium polish: improved sidebar, stat cards, course cards,
   button states, progress bars, and refined responsive layout.
   ═══════════════════════════════════════════════════════════════ */

/* ─── SIDEBAR ENHANCEMENTS ───────────────────────────────────── */
.bm-sidebar {
  box-shadow: 2px 0 20px rgba(8,18,42,.08);
}
html[data-theme="dark"] .bm-sidebar {
  box-shadow: 2px 0 24px rgba(0,0,0,.4);
}
.bm-sidebar-brand { padding-bottom: 16px; }
.bm-nav-link {
  border-radius: var(--r-md);
  position: relative; overflow: hidden;
}
.bm-nav-link::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-glass);
  opacity: 0;
  transition: opacity var(--tr-fast);
  pointer-events: none;
}
.bm-nav-link:hover::after { opacity: 1; }
.bm-nav-link.active {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-subtle) 100%);
  box-shadow: var(--shadow-xs);
}
.bm-nav-link.active::before {
  background: var(--grad-accent);
  width: 3px;
}

/* ─── TOPBAR ENHANCEMENTS ────────────────────────────────────── */
.bm-topbar {
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(8,18,42,.06);
}
html[data-theme="dark"] .bm-topbar {
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,.3);
}

/* ─── STAT CARD ENHANCEMENTS ─────────────────────────────────── */
.bm-stat-card {
  position: relative; overflow: hidden;
}
.bm-stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity var(--tr);
}
.bm-stat-card:hover::before { opacity: 1; }
.bm-stat-card:hover .bm-stat-icon { transform: scale(1.08); }
.bm-stat-icon { transition: transform var(--tr-spring); }
.bm-stat-value { font-size: 30px; letter-spacing: -.02em; }

/* ─── COURSE CARD ENHANCEMENTS ───────────────────────────────── */
.bm-course-card {
  position: relative;
}
.bm-course-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--r-lg);
  background: var(--grad-glass);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr);
}
.bm-course-card:hover::after { opacity: 1; }
.bm-course-cover {
  height: 140px;
  position: relative; overflow: hidden;
}
.bm-course-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.18) 100%);
}
.bm-progress-bar { height: 6px; }
.bm-progress-fill {
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* ─── BUTTON ENHANCEMENTS ────────────────────────────────────── */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 20px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--tr-fast);
  text-decoration: none; white-space: nowrap;
  font-family: var(--font-body);
}
.bm-btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: var(--shadow-blue), var(--shadow-inset);
}
.bm-btn-primary:hover {
  opacity: .9; transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}
.bm-btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.bm-btn-outline:hover { background: var(--primary-light); }
.bm-btn-ghost {
  background: var(--bg-glass); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.bm-btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.bm-btn-danger {
  background: linear-gradient(145deg,#dc2626,#b91c1c); color: #fff;
}
.bm-btn-sm  { padding: 6px 14px; font-size: 12px; }
.bm-btn-lg  { padding: 13px 28px; font-size: 15px; }
.bm-btn-full { width: 100%; }
.bm-btn-success {
  background: linear-gradient(145deg,#059669,#047857); color: #fff;
}

/* ─── FORM IMPROVEMENTS ──────────────────────────────────────── */
.bm-input, .bm-select, .bm-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-glass); border: 1.5px solid var(--border);
  border-radius: var(--r-md); font-size: 14px;
  color: var(--text-primary); outline: none;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
  font-family: var(--font-body);
}
.bm-input:focus, .bm-select:focus, .bm-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--bg-card);
}
.bm-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.bm-form-group { margin-bottom: 18px; }

/* ─── TABLE IMPROVEMENTS ─────────────────────────────────────── */
.bm-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.bm-table th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-overlay);
}
.bm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.bm-table tr:hover td { background: var(--bg-overlay); }
.bm-table tr:last-child td { border-bottom: none; }

/* ─── BADGE IMPROVEMENTS ─────────────────────────────────────── */
.bm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  letter-spacing: .02em;
}
.bm-badge-primary { background: var(--primary); color: #fff; }
.bm-badge-success { background: rgba(5,150,105,.15); color: var(--success); border: 1px solid rgba(5,150,105,.25); }
.bm-badge-warning { background: rgba(217,119,6,.15); color: var(--warning); border: 1px solid rgba(217,119,6,.25); }
.bm-badge-danger  { background: rgba(220,38,38,.12); color: var(--danger);  border: 1px solid rgba(220,38,38,.22); }
.bm-badge-info    { background: var(--accent-light); color: var(--accent);  border: 1px solid rgba(79,142,247,.25); }
.bm-badge-muted   { background: var(--bg-deep);      color: var(--text-muted); border: 1px solid var(--border-subtle); }

/* ─── ALERT IMPROVEMENTS ─────────────────────────────────────── */
.bm-alert {
  padding: 14px 18px; border-radius: var(--r-md);
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; border: 1px solid transparent;
  line-height: 1.5;
}
.bm-alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.bm-alert-success { background: rgba(5,150,105,.09); border-color: rgba(5,150,105,.22); color: #065f46; }
.bm-alert-error   { background: rgba(220,38,38,.09); border-color: rgba(220,38,38,.22); color: #991b1b; }
.bm-alert-info    { background: var(--accent-light); border-color: rgba(79,142,247,.25); color: var(--primary); }
.bm-alert-warning { background: rgba(217,119,6,.09); border-color: rgba(217,119,6,.22); color: #92400e; }
html[data-theme="dark"] .bm-alert-success { color: #6ee7b7; }
html[data-theme="dark"] .bm-alert-error   { color: #fca5a5; }
html[data-theme="dark"] .bm-alert-info    { color: var(--accent-2); }
html[data-theme="dark"] .bm-alert-warning { color: #fcd34d; }

/* ─── MODAL IMPROVEMENTS ─────────────────────────────────────── */
.bm-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 999; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity var(--tr);
}
.bm-modal-overlay.open { opacity: 1; pointer-events: all; }
.bm-modal {
  background: var(--bg-card); border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl); border: 1px solid var(--border);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  animation: bm-modal-in var(--tr-spring) forwards;
}
@keyframes bm-modal-in {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bm-modal-header {
  padding: 22px 24px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.bm-modal-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bm-modal-title i { color: var(--primary); }
.bm-modal-close {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; transition: all var(--tr-fast);
}
.bm-modal-close:hover { background: rgba(220,38,38,.1); color: var(--danger); }
.bm-modal-body { padding: 20px 24px 24px; }

/* ─── EMPTY STATE IMPROVEMENTS ───────────────────────────────── */
.bm-empty {
  text-align: center; padding: 60px 40px;
  background: var(--bg-card); border: 1px dashed var(--border-strong);
  border-radius: var(--r-xl);
}
.bm-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; line-height: 1; }
.bm-empty h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.bm-empty p  { font-size: 14px; color: var(--text-muted); max-width: 340px; margin: 0 auto 20px; line-height: 1.6; }

/* ─── LESSON VIEWER IMPROVEMENTS ────────────────────────────── */
.bm-lesson-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  transition: all var(--tr-fast); cursor: pointer;
  border: 1px solid transparent; margin-bottom: 4px;
}
.bm-lesson-item:hover {
  background: var(--primary-light);
  border-color: var(--border);
}
.bm-lesson-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.bm-lesson-item.completed .bm-lesson-icon { color: var(--success); }
.bm-lesson-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep); color: var(--text-muted);
  font-size: 12px; flex-shrink: 0;
}
.bm-lesson-title { font-size: 13.5px; font-weight: 500; flex: 1; }
.bm-lesson-meta  { font-size: 11.5px; color: var(--text-muted); }

/* ─── CERTIFICATE IMPROVEMENTS ──────────────────────────────── */
.bm-cert-card {
  background: linear-gradient(145deg, #1a4fa0 0%, #0d2d5e 60%, #071835 100%);
  border-radius: var(--r-xl); padding: 32px;
  color: #fff; text-align: center;
  box-shadow: var(--shadow-blue), var(--shadow-lg);
  position: relative; overflow: hidden;
}
.bm-cert-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-mesh);
  opacity: .4; pointer-events: none;
}
.bm-cert-card > * { position: relative; z-index: 1; }
.bm-cert-icon { font-size: 56px; margin-bottom: 12px; }
.bm-cert-title { font-family: var(--font-display); font-size: 26px; font-style: italic; margin-bottom: 8px; }
.bm-cert-course { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.bm-cert-no { font-size: 12px; opacity: .65; font-family: monospace; letter-spacing: .08em; }

/* ─── PAGE HEADER IMPROVEMENTS ───────────────────────────────── */
.bm-page-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}
.bm-page-header h1 { letter-spacing: -.02em; }

/* ─── RESPONSIVE IMPROVEMENTS ────────────────────────────────── */
@media (max-width: 1024px) {
  .bm-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .bm-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .bm-content { padding: 20px 16px; }
  .bm-topbar  { padding: 0 16px; }
  .bm-grid-3, .bm-grid-2 { grid-template-columns: 1fr; }
  .bm-stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .bm-stats-grid { grid-template-columns: 1fr; }
}
