/* ============================================================
   Agentive Academy — Core Design System (v2.0)
   Loaded on every page. Pages may layer their own styles on top.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --navy: #1B2B4D;
  --navy-700: #2A3F6B;
  --navy-900: #111D33;
  --navy-950: #0A1628;
  --gold: #C9A84C;
  --gold-light: #E1C981;
  --gold-dark: #B8953A;
  --cream: #FAF9F6;
  --cream-dark: #F0EDE5;
  --white: #FFFFFF;

  /* Semantic */
  --color-primary: var(--navy);
  --color-accent: var(--gold);
  --color-accent-light: var(--gold-light);
  --color-bg: var(--cream);
  --color-bg-alt: var(--cream-dark);
  --color-surface: var(--white);
  --color-surface-dark: var(--navy-700);
  --color-text: var(--navy);
  --color-text-muted: #64748B;
  --color-text-on-dark: rgba(255,255,255,.85);
  --color-border: rgba(0,0,0,.08);
  --color-border-strong: rgba(0,0,0,.16);

  /* State */
  --color-success: #22C55E;
  --color-success-bg: rgba(34,197,94,.10);
  --color-warning: #F59E0B;
  --color-warning-bg: rgba(245,158,11,.10);
  --color-error: #EF4444;
  --color-error-bg: rgba(239,68,68,.10);
  --color-info: #3B82F6;
  --color-info-bg: rgba(59,130,246,.10);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(27,43,77,.04);
  --shadow-sm: 0 2px 4px rgba(27,43,77,.06);
  --shadow-md: 0 4px 12px rgba(27,43,77,.08);
  --shadow-lg: 0 12px 32px rgba(27,43,77,.12);
  --shadow-xl: 0 20px 48px rgba(27,43,77,.18);
  --shadow-glow: 0 0 0 4px rgba(201,168,76,.15);

  /* Motion */
  --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
  --transition: 250ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 400ms cubic-bezier(.4,0,.2,1);

  /* Z-index scale */
  --z-nav: 100;
  --z-dropdown: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Layout */
  --container: 1200px;
  --container-wide: 1440px;
  --nav-height: 64px;
  --sidebar-width: 260px;
}

/* ---------- 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-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- LAYOUT ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-sm { gap: 8px; }
.gap { gap: 16px; }
.gap-lg { gap: 24px; }

/* ---------- TYPOGRAPHY ---------- */
.h-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.h4 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-mono { font-family: var(--font-mono); }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 12px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; line-height: 1;
  cursor: pointer; border: 1.5px solid transparent;
  transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-xl { padding: 20px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent  { background: var(--gold); color: var(--navy); box-shadow: 0 4px 14px rgba(201,168,76,.25); }
.btn-accent:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,168,76,.35); }
.btn-secondary { background: var(--cream-dark); color: var(--navy); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--white); border-color: var(--color-border-strong); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--color-border-strong); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--navy); background: var(--cream-dark); }
.btn-danger { background: var(--color-error); color: var(--white); }
.btn-danger:hover { background: #DC2626; }

/* ---------- CARDS ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card-elevated { box-shadow: var(--shadow-lg); }
.card-interactive { cursor: pointer; }
.card-interactive:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(201,168,76,.4); }
.card-dark { background: var(--navy-700); color: var(--white); border-color: rgba(255,255,255,.08); }
.card h3 { margin-bottom: 8px; }
.card h4 { margin-bottom: 4px; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.form-hint { display: block; font-size: .75rem; color: var(--color-text-muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: .95rem;
  transition: var(--transition-fast);
}
.form-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: var(--shadow-glow);
}
.form-input:disabled { background: var(--cream-dark); cursor: not-allowed; opacity: .7; }
.form-input.is-error { border-color: var(--color-error); }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  border-radius: var(--radius-full);
}
.badge-accent  { background: rgba(201,168,76,.15); color: var(--gold-dark); }
.badge-success { background: var(--color-success-bg); color: #166534; }
.badge-warning { background: var(--color-warning-bg); color: #92400E; }
.badge-error   { background: var(--color-error-bg); color: #991B1B; }
.badge-info    { background: var(--color-info-bg); color: #1E40AF; }
.badge-neutral { background: var(--cream-dark); color: var(--color-text); }
.badge-dot::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }

/* ---------- TABLES ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--color-border); }
.table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
.table th, .table td { padding: 12px 16px; text-align: left; font-size: .875rem; }
.table th { background: var(--cream-dark); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); }
.table td { border-bottom: 1px solid var(--color-border); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(201,168,76,.04); }

/* ---------- PROGRESS BARS ---------- */
.progress-bar { height: 8px; background: rgba(0,0,0,.06); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-lg { height: 12px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: var(--radius-full); transition: width var(--transition-slow); }
.progress-bar-fill.success { background: linear-gradient(90deg, var(--color-success), #34D399); }

/* ---------- TABS ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); margin-bottom: 24px; }
.tab { padding: 12px 20px; font-size: .9rem; font-weight: 600; color: var(--color-text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: var(--transition-fast); }
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- ALERTS ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .9rem; display: flex; gap: 12px; align-items: flex-start; }
.alert-success { background: var(--color-success-bg); color: #166534; border-left: 4px solid var(--color-success); }
.alert-warning { background: var(--color-warning-bg); color: #92400E; border-left: 4px solid var(--color-warning); }
.alert-error   { background: var(--color-error-bg); color: #991B1B; border-left: 4px solid var(--color-error); }
.alert-info    { background: var(--color-info-bg); color: #1E40AF; border-left: 4px solid var(--color-info); }

/* ---------- MODALS ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,22,40,.65); backdrop-filter: blur(4px); z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--color-surface); border-radius: var(--radius-lg); max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); }
.modal-header { padding: 24px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 24px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--color-border); display: flex; gap: 12px; justify-content: flex-end; }
.modal-close { background: none; border: none; color: var(--color-text-muted); font-size: 1.5rem; cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--color-text); }
.modal-lg { max-width: 760px; }

/* ---------- NAVIGATION (top bar) ---------- */
.lms-nav { position: sticky; top: 0; z-index: var(--z-nav); background: var(--navy); color: var(--white); border-bottom: 1px solid rgba(201,168,76,.15); }
.lms-nav-inner { height: var(--nav-height); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; max-width: var(--container-wide); margin: 0 auto; }
.lms-nav-brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.lms-nav-brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1rem; }
.lms-nav-links { display: flex; gap: 8px; align-items: center; }
.lms-nav-links a { color: rgba(255,255,255,.75); padding: 8px 12px; border-radius: var(--radius-xs); font-size: .9rem; font-weight: 500; transition: var(--transition-fast); }
.lms-nav-links a:hover, .lms-nav-links a.active { color: var(--gold); background: rgba(201,168,76,.08); }
.lms-nav-cta { background: var(--gold) !important; color: var(--navy) !important; padding: 8px 16px !important; font-weight: 700 !important; }
.lms-nav-cta:hover { background: var(--gold-light) !important; }
.lms-nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; }

/* ---------- ADMIN / DASHBOARD SIDEBAR ---------- */
.lms-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; }
.lms-sidebar { background: var(--navy); color: var(--white); padding: 20px 0; border-right: 1px solid rgba(201,168,76,.15); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lms-sidebar-brand { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.lms-sidebar-brand h2 { color: var(--gold); font-size: 1rem; font-weight: 800; }
.lms-sidebar-brand span { color: rgba(255,255,255,.5); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.lms-sidebar nav { padding: 0 8px; }
.lms-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: rgba(255,255,255,.7); font-size: .9rem; font-weight: 500; border-radius: var(--radius-xs); transition: var(--transition-fast); }
.lms-sidebar nav a:hover { color: var(--gold); background: rgba(201,168,76,.08); }
.lms-sidebar nav a.active { color: var(--navy); background: var(--gold); font-weight: 600; }
.lms-sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.lms-sidebar-section { padding: 16px 20px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); font-weight: 700; }
.lms-main { padding: 32px; max-width: 100%; overflow-x: hidden; }
.lms-main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }

/* ---------- STAT CARDS ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; }
.stat-card .label { font-size: .75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 8px; }
.stat-card .value { font-size: 1.75rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.stat-card .change { font-size: .8rem; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-card .change.up { color: var(--color-success); }
.stat-card .change.down { color: var(--color-error); }

/* ---------- COURSE / CONTENT CARDS ---------- */
.course-card { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-card-banner { height: 8px; background: linear-gradient(90deg, var(--navy), var(--gold)); }
.course-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; background: var(--cream-dark); color: var(--navy); }
.course-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.course-card p { font-size: .9rem; color: var(--color-text-muted); line-height: 1.55; margin-bottom: 16px; }
.course-card-meta { display: flex; gap: 16px; font-size: .8rem; color: var(--color-text-muted); margin-bottom: 16px; flex-wrap: wrap; }
.course-card-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.course-card-price { font-size: 1rem; font-weight: 700; color: var(--navy); }
.course-card-price .from { color: var(--color-text-muted); font-weight: 400; font-size: .8rem; margin-right: 4px; }

/* ---------- LESSON / COURSE PLAYER ---------- */
.lesson-shell { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - var(--nav-height)); }
.lesson-sidebar { background: var(--cream); border-right: 1px solid var(--color-border); padding: 20px 0; overflow-y: auto; position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height)); }
.lesson-sidebar-header { padding: 0 20px 16px; border-bottom: 1px solid var(--color-border); margin-bottom: 12px; }
.lesson-sidebar h3 { font-size: .95rem; margin-bottom: 4px; }
.lesson-content { padding: 40px; max-width: 880px; margin: 0 auto; line-height: 1.75; }
.lesson-content h1 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 16px; letter-spacing: -.02em; }
.lesson-content h2 { font-size: 1.75rem; margin: 40px 0 16px; }
.lesson-content h3 { font-size: 1.3rem; margin: 28px 0 12px; }
.lesson-content p { margin-bottom: 16px; font-size: 1rem; }
.lesson-content ul, .lesson-content ol { margin: 0 0 16px 24px; }
.lesson-content li { margin-bottom: 6px; }
.lesson-content pre { background: var(--navy-950); color: var(--cream); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; font-family: var(--font-mono); font-size: .85rem; margin-bottom: 16px; }
.lesson-content code { background: var(--cream-dark); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .9em; }
.lesson-content pre code { background: none; padding: 0; }
.lesson-video { aspect-ratio: 16/9; background: var(--navy-950); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; position: relative; }
.lesson-video iframe { width: 100%; height: 100%; border: none; }

.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: var(--color-text); font-size: .88rem; cursor: pointer; transition: var(--transition-fast); border-left: 3px solid transparent; }
.nav-item:hover { background: var(--cream-dark); }
.nav-item.active { background: rgba(201,168,76,.12); color: var(--navy); border-left-color: var(--gold); font-weight: 600; }
.nav-item.completed { color: var(--color-success); }
.nav-item.completed .nav-icon { background: var(--color-success); color: var(--white); border-color: var(--color-success); }
.nav-item.locked { color: var(--color-text-muted); cursor: not-allowed; opacity: .6; }
.nav-icon { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--color-border); display: flex; align-items: center; justify-content: center; font-size: .7rem; flex-shrink: 0; font-weight: 700; }
.nav-text { flex: 1; }
.nav-level-header { padding: 16px 20px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--color-text-muted); }

/* ---------- QUIZ ---------- */
.inline-quiz, .eol-quiz { background: var(--cream-dark); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.inline-quiz-header, .eol-quiz-header { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-accent); margin-bottom: 12px; }
.eol-quiz-header h2 { font-size: 1.5rem; text-transform: none; letter-spacing: -.01em; color: var(--navy); margin-bottom: 4px; }
.eol-quiz-header p { font-size: .85rem; color: var(--color-text-muted); }
.quiz-question { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; color: var(--navy); line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--white); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition-fast); font-size: .95rem; }
.quiz-option:hover { border-color: var(--gold); background: rgba(201,168,76,.04); }
.quiz-option.correct { border-color: var(--color-success); background: var(--color-success-bg); }
.quiz-option.incorrect { border-color: var(--color-error); background: var(--color-error-bg); }
.option-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--cream-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.quiz-feedback { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; display: none; }
.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: var(--color-success-bg); color: #166534; }
.quiz-feedback.incorrect { background: var(--color-error-bg); color: #991B1B; }
.eol-quiz-progress { margin-bottom: 20px; }
.eol-quiz-progress > span { font-size: .8rem; color: var(--color-text-muted); display: block; margin-bottom: 6px; }
.eol-quiz-results { text-align: center; padding: 32px 16px; }
.eol-quiz-score { font-size: 4rem; font-weight: 900; letter-spacing: -.04em; margin-bottom: 8px; }
.eol-quiz-score.pass { color: var(--color-success); }
.eol-quiz-score.fail { color: var(--color-error); }
.mark-complete-btn { background: var(--color-success); color: var(--white); padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; cursor: pointer; transition: var(--transition); }
.mark-complete-btn:hover { background: #16A34A; }
.mark-complete-btn.completed { background: var(--color-text-muted); cursor: default; }

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--color-text-muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--color-text-muted); transition: var(--transition-fast); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .separator { opacity: .5; }
.breadcrumbs .current { color: var(--navy); font-weight: 600; }

/* ---------- TOASTS ---------- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: var(--white); padding: 12px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .9rem; min-width: 280px; max-width: 400px; border-left: 4px solid var(--gold); animation: toast-in .25s ease-out; }
.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-error); }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- ANIMATIONS ---------- */
@keyframes confettiFall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(201,168,76,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- CONTENT PROTECTION ---------- */
.protected { -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.watermark { position: fixed; bottom: 12px; right: 16px; font-size: .65rem; color: rgba(0,0,0,.10); pointer-events: none; user-select: none; z-index: 1; font-family: var(--font-mono); }

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: 8px; } .mt { margin-top: 16px; } .mt-lg { margin-top: 24px; } .mt-xl { margin-top: 40px; }
.mb-sm { margin-bottom: 8px; } .mb { margin-bottom: 16px; } .mb-lg { margin-bottom: 24px; } .mb-xl { margin-bottom: 40px; }
.divider { height: 1px; background: var(--color-border); margin: 24px 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .lms-shell { grid-template-columns: 1fr; }
  .lms-sidebar { position: fixed; left: -100%; width: 280px; z-index: var(--z-modal); transition: left var(--transition); }
  .lms-sidebar.open { left: 0; }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-sidebar { display: none; }
  .lesson-sidebar.open { display: block; position: fixed; left: 0; top: var(--nav-height); width: 280px; z-index: var(--z-modal); background: var(--cream); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 16px; }
  .lms-main { padding: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .lesson-content { padding: 24px 16px; }
  .lms-nav-links { display: none; }
  .lms-nav-links.mobile-open { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--navy); padding: 16px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .modal { margin: 16px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .btn { padding: 12px 18px; }
}

/* ---------- PRINT ---------- */
@media print {
  .lms-nav, .lms-sidebar, .lesson-sidebar, .modal-overlay, .toast-container { display: none !important; }
  .lms-main, .lesson-content { padding: 0; max-width: 100%; }
}
