/* AI: LumeLMS — product stylesheet. Layers on top of base.css.
   AI: base.css provides all tokens (colors, spacing, radius, shadows, fonts) and resets.
   AI: This file adds ONLY LumeLMS-specific layout, components, and product brand overrides.
   AI: Load order: base.css → base-navbar.css → lumelms.css
   AI: No hardcoded hex colors — everything via var(). */

/* ── LumeLMS product brand tokens (extend base.css :root) ── */
/* AI: Light copper theme — warm cream backgrounds, professional burnt-orange accent.
   AI: --lume-accent is the primary interactive color (buttons, active nav, progress bars).
   AI: --lume-copper-50/100/200 replace the old blue sidebar/hover/avatar tones. */
:root {
  --lume-accent:       #C26E32;
  --lume-accent-hover: #A85E2A;
  --lume-accent-text:  #fff;
  --lume-copper-50:    #FDF8F4;
  --lume-copper-100:   #FAF0E6;
  --lume-copper-200:   #F2DAC4;
  --lume-warm-50:      #FFFBF5;
  --lume-sidebar-w:    240px;
}

/* ── Body override for full-height app layout ───────────── */
body {
  overflow: hidden;
  height: 100vh;
}

/* ── Login overlay ──────────────────────────────────────── */
#login-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--lume-copper-100) 0%, var(--lume-warm-50) 50%, var(--lume-copper-50) 100%);
}
#login-overlay.hidden { display: none; }

#login-card {
  background: var(--bg-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg, 0 4px 12px rgba(0,0,0,.1));
  padding: 40px 36px 32px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
}

.login-brand { margin-bottom: 28px; }
.login-brand .logo {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--text-primary, #1a2332);
}
.login-brand .logo span { color: var(--lume-accent); }
.login-brand .tagline {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted, #8a95a3);
  margin-top: 4px;
}

.lume-field-group { margin-bottom: 16px; text-align: left; }
.lume-field-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.lume-field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-surface, #fff);
  transition: border 150ms ease;
}
.lume-field-input:focus { outline: none; border-color: var(--lume-accent); box-shadow: 0 0 0 3px rgba(194,110,50,.15); }
.lume-field-input:disabled { background: var(--bg-surface-alt, #f8fafb); color: var(--text-muted); cursor: not-allowed; }

#login-error { color: var(--text-error, #DC2626); font-size: 13px; min-height: 20px; margin-bottom: 4px; }

.lume-login-btn { margin-top: 8px; padding: 10px 14px; font-size: 14px; }
.lume-demo-info { margin-top: 16px; font-size: 11px; color: var(--text-muted); line-height: 1.6; }

/* ── Buttons (LumeLMS variants, base.css provides .btn core) ── */
.lume-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: none; border-radius: var(--radius-md, 8px);
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background 150ms ease, box-shadow 150ms ease;
}
.lume-btn-primary { background: var(--lume-accent); color: var(--lume-accent-text); }
.lume-btn-primary:hover { background: var(--lume-accent-hover); }
.lume-btn-ghost { background: transparent; color: var(--text-muted); }
.lume-btn-ghost:hover { background: var(--bg-surface-alt, #f8fafb); color: var(--text-primary); }
.lume-btn-sm { padding: 5px 10px; font-size: 12px; }
.lume-btn-full { width: 100%; justify-content: center; }

/* ── App shell ──────────────────────────────────────────── */
#app-shell { display: none; height: calc(100vh - var(--pub-header-h, 64px)); }
#app-shell.active { display: flex; }

/* ── Sidebar ────────────────────────────────────────────── */
#sidebar {
  width: var(--lume-sidebar-w);
  min-width: var(--lume-sidebar-w);
  background: var(--lume-copper-50);
  border-right: 1px solid var(--border-default, #e2e8f0);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default, #e2e8f0);
}
.sidebar-brand .logo {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text-primary, #1a2332);
}
.sidebar-brand .logo span { color: var(--lume-accent); }
.sidebar-brand .org-name { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 20px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 20px;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-muted);
  background: none; border: none; border-left: 3px solid transparent;
  cursor: pointer; transition: background 150ms ease, color 150ms ease;
  text-align: left;
}
.nav-item:hover { background: var(--lume-copper-100); color: var(--text-primary); }
.nav-item.active {
  background: var(--lume-copper-100);
  color: var(--lume-accent);
  border-left-color: var(--lume-accent);
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-default, #e2e8f0);
  font-size: 12px; color: var(--text-muted);
}
.sidebar-user { display: flex; align-items: center; gap: 8px; }
.sidebar-user-name { font-weight: 500; color: var(--text-primary); }
.sidebar-user-role { font-size: 11px; }
.sidebar-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lume-copper-200); color: var(--lume-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}

/* ── Main content area ──────────────────────────────────── */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Views (toggle via .view-active) ────────────────────── */
[data-view] { display: none; }
[data-view].view-active { display: block; }

/* ── Dashboard ──────────────────────────────────────────── */
.dash-greeting { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.dash-sub { color: var(--text-muted); margin-bottom: 24px; }
.dash-activity-note { color: var(--text-muted); font-size: 13px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 20px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));
}
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-value.success { color: var(--text-success, #059669); }
.stat-card .stat-value.warn { color: var(--text-warning, #b8860b); }
.stat-card .stat-value.primary { color: var(--lume-accent); }
.stat-card .stat-value.danger  { color: var(--text-error, #DC2626); }

.section-heading {
  font-size: 15px; font-weight: 600;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Course cards ───────────────────────────────────────── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}
.course-card.clickable { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.course-card:hover { box-shadow: var(--shadow-md, 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06)); }
.course-card.dimmed { opacity: 0.7; }

.course-card .card-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--lume-copper-200), var(--lume-warm-50));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.course-card .card-body { padding: 14px 16px; }
.course-card .card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.course-card .card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

.progress-bar {
  height: 6px;
  background: var(--border-default, #e2e8f0);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%; border-radius: 3px;
  background: var(--lume-accent);
  transition: width 300ms ease;
}
.progress-bar .fill.complete { background: var(--text-success, #059669); }

.progress-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Table ──────────────────────────────────────────────── */
.lume-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lume-table th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-default, #e2e8f0);
}
.lume-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-default, #e2e8f0); }
.lume-table tr:hover td { background: var(--bg-surface-alt, #f8fafb); }
.lume-table-clickable { cursor: pointer; }

/* ── Pills (status badges) ──────────────────────────────── */
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
}
.pill-green  { background: var(--tag-success-bg, #eafaf1); color: var(--tag-success-text, #047857); }
.pill-yellow { background: var(--tag-warning-bg, #fef9e7); color: var(--tag-warning-text, #b8860b); }
.pill-red    { background: var(--alert-error-bg, #fdedec); color: var(--text-error, #DC2626); }
.pill-blue   { background: var(--tag-info-bg, #eaf0fb); color: var(--tag-info-text, #5b6abf); }
.pill-gray   { background: var(--bg-surface-alt, #f8fafb); color: var(--text-secondary, #5a6978); }

/* ── Empty state ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { max-width: 320px; margin: 0 auto 16px; font-size: 13px; }

/* ── Compliance banner ──────────────────────────────────── */
.compliance-banner {
  background: linear-gradient(90deg, var(--lume-warm-50), var(--lume-copper-50));
  border: 1px solid var(--lume-copper-200);
  border-radius: var(--radius-lg, 12px);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.compliance-banner .banner-icon { font-size: 28px; }
.compliance-banner .banner-text { font-size: 13px; }
.compliance-banner .banner-text strong { color: var(--text-primary); }

/* ── Learner management (app.js view renderers) ─────────── */
.learners-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.learners-count { color: var(--text-muted); font-size: 13px; }

.learner-detail-cell {
  padding: 12px 16px;
  background: var(--bg-surface-alt, #f8fafb);
  border-bottom: 2px solid var(--border-default, #e2e8f0);
}
.learner-detail-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.learner-detail-section { flex: 1; min-width: 200px; }
.learner-detail-section.wide { flex: 2; min-width: 260px; }
.learner-detail-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
}
.learner-detail-value { margin-top: 6px; font-size: 13px; }
.learner-detail-overdue { color: var(--text-error, #DC2626); }
.learner-detail-pending { color: var(--text-warning, #b8860b); }

.enrollment-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 13px;
}

/* ── Compliance role footnote ───────────────────────────── */
.compliance-role { color: var(--text-muted); font-size: 11px; }

/* ── Transcript summary ─────────────────────────────────── */
.transcript-summary { margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.transcript-summary strong { color: var(--text-primary); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(15,23,42,.4);
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.lume-modal {
  background: var(--bg-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg);
  width: 520px; max-width: 92vw; max-height: 85vh;
  overflow-y: auto; padding: 24px;
}
.lume-modal-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.lume-modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(15,23,42,.4);
  display: flex; align-items: center; justify-content: center;
}
.lume-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.lume-modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.lume-modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-muted); padding: 0 4px; line-height: 1;
}
.lume-modal-close:hover { color: var(--text-primary); }
.lume-modal-body { margin-bottom: 20px; }
.lume-modal-footer { display: flex; justify-content: flex-end; gap: 8px; }
.lume-field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary, #475569); }
.lume-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border-default, #CBD5E1);
  border-radius: var(--radius-md, 8px); font-size: 14px; box-sizing: border-box;
}
.lume-input:focus { outline: none; border-color: var(--lume-accent); box-shadow: 0 0 0 2px rgba(194,110,50,.15); }

/* ── Mobile nav overlay ─────────────────────────────────── */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}
#sidebar-overlay.active { display: block; }

/* ── Mobile menu toggle button ─────────────────────────── */
#mobile-menu-btn {
  display: none;
  position: fixed;
  top: calc(var(--pub-header-h, 64px) + 8px);
  left: 8px;
  z-index: 210;
  width: 44px; height: 44px;
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-surface, #fff);
  color: var(--text-primary, #1e293b);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  align-items: center;
  justify-content: center;
}
#mobile-menu-btn:hover { background: var(--bg-surface-hover, #f8fafc); }
#mobile-menu-btn:focus-visible { outline: 2px solid var(--brand-lume, #7C3AED); outline-offset: 2px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --lume-sidebar-w: 0px; }
  #sidebar {
    display: flex;
    position: fixed; top: var(--pub-header-h, 64px); left: 0; bottom: 0;
    width: 240px; z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #mobile-menu-btn { display: inline-flex; }
  .lume-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Settings view ──────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; }
.settings-section { background: var(--bg-surface, #fff); border: 1px solid var(--border-default, #e2e8f0); border-radius: 10px; padding: 20px; }
.settings-heading { font-size: 15px; font-weight: 700; color: var(--text-primary, #1e293b); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-default, #e2e8f0); }
.settings-field { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.settings-label { color: var(--text-muted, #6b7785); }
.settings-value { color: var(--text-primary, #1e293b); font-weight: 500; }
.settings-mono { font-family: var(--font-mono, monospace); font-size: 12px; }
.settings-muted { color: var(--text-muted, #6b7785); font-style: italic; font-weight: 400; }
.settings-action-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px;
}
.settings-action-row .settings-label { flex: 1; }
.settings-rule {
  background: var(--bg-surface-alt, #f8fafb);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px; margin-bottom: 8px;
}
.settings-rule-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2px;
}
.settings-rule-header strong { font-size: 13px; }
.lume-btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-muted); padding: 0 4px; line-height: 1;
}
.lume-btn-icon:hover { color: var(--text-error, #DC2626); }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }

/* ── Learning path steps ───────────────────────────────── */
.path-steps { display: flex; flex-direction: column; gap: 8px; }
.path-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  transition: border-color 150ms ease;
}
.path-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  background: var(--lume-copper-100); color: var(--text-secondary, #475569);
}
.path-step-info { flex: 1; min-width: 0; }
.path-step-title { font-weight: 600; }
.step-complete .path-step-num { background: var(--tag-success-bg, #eafaf1); color: var(--tag-success-text, #047857); }
.step-complete { border-color: var(--tag-success-bg, #eafaf1); }
.step-active .path-step-num { background: var(--lume-accent); color: var(--lume-accent-text); }
.step-active { border-color: var(--lume-accent); }
.step-locked { opacity: 0.6; }
.step-locked .path-step-num { background: var(--bg-surface-alt, #f8fafb); color: var(--text-muted); }
.step-pending .path-step-num { background: var(--lume-copper-100); color: var(--text-secondary, #475569); }

/* ── Path course option checkboxes ─────────────────────── */
.path-course-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px; cursor: pointer;
}
.path-course-opt input[type="checkbox"] { margin: 0; }

/* ── Generic card (learning paths, etc.) ───────────────── */
.lume-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));
}

/* ── Learner management actions row ────────────────────── */
.learners-actions { display: flex; gap: 8px; align-items: center; }

/* ── Learner Portal (Settings) ───────────────────────────── */
.settings-portal-section { grid-column: 1 / -1; }
.learner-link-display {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 12px;
  background: var(--bg-inset, #F8FAFC);
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-default, #E2E8F0);
  margin-right: 6px;
}
.portal-invite-area { margin-top: 14px; }
.portal-invite-area label { display: block; margin-bottom: 6px; }
.portal-invite-area textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-default, #D1D5DB);
  border-radius: var(--radius-md, 8px);
  resize: vertical;
}
.portal-invite-area textarea:focus {
  border-color: var(--lume-accent, #C26E32);
  outline: none;
  box-shadow: 0 0 0 3px rgba(194,110,50,.12);
}
.portal-invite-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.portal-invite-row select { max-width: 200px; }
.settings-invite-msg {
  font-size: 13px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 4px);
}
.invite-success { background: var(--alert-success-bg, #F0FDF4); color: var(--alert-success-text, #059669); }
.invite-error { background: var(--alert-error-bg, #FEF2F2); color: var(--alert-error-text, #DC2626); }

/* Learner table in portal */
.portal-learner-table { margin-top: 14px; font-size: 13px; }
.portal-learner-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 80px 90px 36px;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-subtle, #F1F5F9);
}
.portal-learner-header-row {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted, #64748B);
  border-bottom: 2px solid var(--border-default, #E2E8F0);
}

/* ── Statistics view ─────────────────────────────────────── */
.stats-controls { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.stats-controls select, .stats-controls input {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1.5px solid var(--border-default, #D1D5DB);
  border-radius: var(--radius-md, 8px);
}
.stats-course-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #E2E8F0);
  border-radius: var(--radius-lg, 12px);
  padding: 20px;
  margin-bottom: 16px;
}
.stats-course-card h3 { font-size: 16px; margin-bottom: 4px; }
.stats-course-meta { font-size: 12px; color: var(--text-muted, #64748B); margin-bottom: 16px; }
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.stats-metric {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  background: var(--bg-inset, #F8FAFC);
  border-radius: var(--radius-md, 8px);
  text-align: center;
}
.stats-metric .val { font-size: 22px; font-weight: 700; color: var(--text-primary, #1a2332); }
.stats-metric .lbl { font-size: 11px; color: var(--text-muted, #64748B); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.stats-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.stats-bar-label { width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.stats-bar-track { flex: 1; height: 18px; background: var(--bg-inset, #F1F5F9); border-radius: 9px; overflow: hidden; position: relative; }
.stats-bar-fill { height: 100%; border-radius: 9px; transition: width .3s; }
.stats-bar-pct { width: 44px; text-align: right; font-weight: 600; font-size: 12px; flex-shrink: 0; }

/* ── Mobile single-column overrides ─────────────────── */
@media (max-width: 640px) {
  .portal-learner-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
  }
  .portal-learner-header-row { display: none; }
  .stats-row { flex-direction: column; }
}

/* ── Continue Learning card ─────────────────────────── */
.lume-continue-card {
  background: linear-gradient(135deg, var(--lume-copper-50), var(--lume-warm-50));
  border: 1px solid var(--lume-copper-200);
  border-radius: var(--radius-lg, 12px);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.lume-continue-card--empty { flex-direction: column; align-items: flex-start; gap: 12px; }
.lume-continue-header {
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--lume-accent);
  flex-basis: 100%;
}
.lume-continue-body { flex: 1; min-width: 200px; }
.lume-continue-body p { font-size: 13px; color: var(--text-muted); }
.lume-continue-title { font-size: 16px; font-weight: 600; color: var(--text-primary, #1a2332); }
.lume-continue-resume {
  font-size: 14px; padding: 10px 28px;
  white-space: nowrap; text-decoration: none;
}

/* ── Completion celebration modal ──────────────────── */
.lume-completion-modal {
  text-align: center;
  padding: 36px 28px 24px;
  max-width: 440px;
}
.lume-completion-icon { font-size: 48px; margin-bottom: 12px; }
.lume-completion-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary, #1a2332); }
.lume-completion-score { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.lume-completion-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.lume-completion-dismiss { display: block; margin: 0 auto; font-size: 13px; }

/* Offline indicator */
.lume-offline-banner{display:none;padding:8px 16px;background:var(--tag-warning-bg,#FEF3C7);color:var(--tag-warning-text,#92400E);font-size:12px;text-align:center;border-bottom:1px solid var(--tag-warning-border,#FCD34D)}

/* Login error detail subtext (used by showLoginError({title,detail})) */
.oh-login-error-detail{font-size:11px;display:inline-block;margin-top:2px;opacity:.85}

/* Paywall (rendered by showPaywall in login.js; previously inline styles) */
.lume-paywall{text-align:center;padding:40px 24px}
.lume-paywall-title{margin:0 0 12px;color:var(--text-primary,#1E293B);font-family:'Playfair Display',serif}
.lume-paywall-msg{font-size:14px;color:var(--text-secondary,#475569);line-height:1.6;margin:0 0 20px}
.lume-paywall-cta{display:inline-block;padding:10px 24px;background:var(--brand-deep-teal,#0E6B6B);color:var(--text-on-dark, #fff);border-radius:6px;text-decoration:none;font-weight:600}
.lume-paywall-cta:hover{filter:brightness(1.08)}

/* ── Course Launcher (launch.html) ─────── */
html.lume-launch, html.lume-launch body { height: 100%; overflow: hidden; }
html.lume-launch body {
  display: flex; flex-direction: column;
  background: var(--bg-dark, #142942);
}
.loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-page, #F0F2F5);
  z-index: 10; flex-direction: column; gap: 8px;
  color: var(--text-primary, #333);
}
.loader .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border-default, #E2E8F0);
  border-top-color: var(--lume-accent);
  border-radius: 50%;
  animation: lume-spin .7s linear infinite;
}
.loader h2 { font-size: 18px; }
.loader p { color: var(--text-muted, #64748B); font-size: 13px; }
@keyframes lume-spin { to { transform: rotate(360deg); } }
.loader.error { background: var(--alert-error-bg, #FEF2F2); }
.loader.error .spinner { display: none; }
.loader.error h2 { color: var(--alert-error-text, #DC2626); }
.loader.error a { color: var(--lume-accent); }
.lume-launch-back { margin-top: 8px; display: inline-block; }
#frame { flex: 1; border: none; width: 100%; background: var(--bg-page, #F0F2F5); }
.lume-launch-citation-link { color: var(--clr-accent, var(--lume-accent)); }

/* ── Extracted inline styles from app.js (no inline style= except dynamic width/display:none) ── */

/* Link styled as button (for javascript: URL replacement) */
.lume-link-btn { background: none; border: none; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

/* Progress bar with vertical margin (continue-learning card, learning path cards) */
.lume-progress-bar-spaced { margin: 10px 0 4px; }

/* "Add your first course" link in empty catalog — remove underline on button-styled anchor */
.lume-no-underline { text-decoration: none; }

/* Learner count breakdown (internal/external) */
.lume-learner-breakdown { font-size: 12px; }

/* Margin-top:12px — used on empty-state action paragraphs */
.lume-mt-12 { margin-top: 12px; }

/* Card actions row (course cards) */
.lume-card-actions { margin-top: 8px; }

/* Modal max-width 640px (course detail modal) */
.lume-modal-w640 { max-width: 640px; }

/* Course detail actions row */
.lume-detail-actions { margin-top: 16px; display: flex; gap: 8px; }

/* Meta text with top margin (no-attempts, no-enrollments placeholders) */
.lume-meta-mt-12 { margin-top: 12px; }

/* Section sub-heading (attempt history, answer distribution) */
.lume-section-subheading { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }

/* Modal max-width 700px (learner detail modal) */
.lume-modal-w700 { max-width: 700px; }

/* Learning path card container */
.lume-path-card { margin-bottom: 16px; padding: 24px; }

/* Learning path card header layout */
.lume-path-header { display: flex; justify-content: space-between; align-items: start; }

/* Learning path title */
.lume-path-title { font-size: 17px; }

/* Learning path description meta */
.lume-meta-mt-4 { margin-top: 4px; }

/* Learning path progress bar spacing */
.lume-progress-bar-path { margin: 12px 0 16px; }

/* Learning path admin delete row */
.lume-path-admin-row { margin-top: 12px; text-align: right; }

/* Form field label with top margin (modal forms) */
.lume-field-label-mt { margin-top: 12px; }

/* Scrollable form list — short (100px) */
.lume-form-list-sm { max-height: 100px; overflow-y: auto; }

/* Scrollable form list — medium (150px) */
.lume-form-list-md { max-height: 150px; overflow-y: auto; }

/* Scrollable form list — medium with bottom margin (assign learners) */
.lume-form-list-md-mb { max-height: 150px; overflow-y: auto; margin-bottom: 12px; }

/* Scrollable form list — tall (200px, path course list) */
.lume-form-list { max-height: 200px; overflow-y: auto; }

/* Modal description paragraph — bottom margin */
.lume-modal-desc-mb { margin-bottom: 12px; }

/* Bulk import preview area */
.lume-import-preview { margin-top: 12px; max-height: 200px; overflow-y: auto; font-size: 13px; }

/* Placeholder hint paragraph — small bottom margin */
.lume-modal-hint { margin-bottom: 8px; }

/* Team progress clickable row */
.lume-clickable-row { cursor: pointer; }

/* Answer distribution heading */
.lume-stats-dist-heading { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

/* Answer distribution question block */
.lume-stats-question { margin-bottom: 12px; }

/* Answer distribution question label */
.lume-stats-question-label { font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary, #475569); }

/* Portal learner list placeholder */
.lume-portal-placeholder { margin-top: 12px; }

/* Noscript fallback message */
.lume-noscript-msg { padding: 32px; text-align: center; color: var(--text-secondary, #475569); }
