/**
 * learning-admin.css
 * frontend/assets/css/learning-admin.css
 *
 * Styles for:
 *   AssignmentManagerPage  (.vam-*)
 *   AssignmentProgressPage (.vap-*)
 *   LearningViewerPage     (.vlp-*)
 *
 * Design language: uses design-system.css tokens directly — no separate
 * theme variables.  All colours come from --surface-*, --text-*, --color-*
 * tokens defined in design-system.css.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   Layout wrapper
───────────────────────────────────────────────────────────────────────────── */
.vam-wrap,
.vap-wrap {
  min-height: 100vh;
  background: var(--surface-bg);
  font-family: var(--font-body);
  color: var(--text-primary);
}

.vam-main,
.vap-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Page header
───────────────────────────────────────────────────────────────────────────── */
.vam-header,
.vap-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.vam-title,
.vap-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; color: var(--text-primary); }
.vam-subtitle,
.vap-subtitle { font-size: .875rem; color: var(--text-secondary); margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Status tabs
───────────────────────────────────────────────────────────────────────────── */
.vam-tab-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 20px;
  padding-bottom: 0;
}

.vam-tab {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.vam-tab:hover { color: var(--text-primary); background: var(--surface-card); }
.vam-tab--active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
  font-weight: 600;
}
.vam-tab:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ─────────────────────────────────────────────────────────────────────────────
   Toast
───────────────────────────────────────────────────────────────────────────── */
.vam-toast {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 16px;
  animation: fadeInDown .2s ease;
}
.vam-toast--success { background: rgba(0,196,140,.15); color: var(--color-green); border: 1px solid rgba(0,196,140,.30); }
.vam-toast--error   { background: var(--color-red-glow); color: var(--color-red);  border: 1px solid rgba(229,57,53,.35); }
.vam-toast--info    { background: var(--color-teal-glow); color: var(--color-teal); border: 1px solid rgba(0,180,162,.30); }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Skeleton loaders
───────────────────────────────────────────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -600px 0; }
  to   { background-position:  600px 0; }
}
.vam-skeleton-card,
.vap-skeleton-kpi,
.vap-skeleton-ring,
.vap-skeleton--header,
.vap-skeleton--table {
  background: linear-gradient(90deg,
    var(--surface-card) 0%, var(--surface-elevated) 50%, var(--surface-card) 100%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
.vam-skeleton { display: flex; flex-direction: column; gap: 16px; }
.vam-skeleton-card { height: 140px; }

.vap-skeleton--header { height: 64px; margin-bottom: 24px; }
.vap-skeleton--table  { height: 320px; }
.vap-skeleton-ring    { width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; }
.vap-skeleton-kpi     { height: 80px; }

/* ─────────────────────────────────────────────────────────────────────────────
   Assignment Cards  (.vam-card-*)
───────────────────────────────────────────────────────────────────────────── */
.vam-card-list { display: flex; flex-direction: column; gap: 14px; }

.vam-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.vam-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.vam-card-body { padding: 20px 24px; }

.vam-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.vam-card-info { flex: 1; min-width: 0; }
.vam-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vam-card-meta { font-size: .8rem; color: var(--text-secondary); margin: 0 0 4px; }
.vam-card-desc { font-size: .85rem; color: var(--text-secondary); margin: 0; }

.vam-standing-rule-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 7px 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  font-size: .8rem;
  flex-wrap: wrap;
}
.vam-standing-rule-alert__icon { color: var(--color-amber, #f59e0b); font-size: .9rem; flex-shrink: 0; }
.vam-standing-rule-alert__msg  { color: var(--text-secondary); flex: 1; min-width: 0; }
.vam-standing-rule-alert__cta  { margin-left: auto; flex-shrink: 0; }

.vam-card-kpis {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}
.vam-kpi { text-align: center; }
.vam-kpi-val          { display: block; font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.vam-kpi-val--warn    { color: var(--color-amber); }
.vam-kpi-val--done    { color: var(--color-teal); }
.vam-kpi-val--progress{ color: var(--color-amber); }
.vam-kpi-lbl          { font-size: .7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }

/* Progress bar within card */
.vam-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
}
.vam-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 9999px;
  overflow: hidden;
}
/* Default single-fill (green = completed) */
.vam-progress-fill {
  height: 100%;
  background: var(--color-teal);
  border-radius: 9999px;
  transition: width .4s ease;
}
/* Stacked two-segment bar: teal (done) + amber (in-progress) */
.vam-progress-bar--stacked { position: relative; overflow: visible; }
.vam-progress-bar--stacked .vam-progress-fill--done {
  position: absolute; top: 0; left: 0;
  height: 6px; border-radius: 9999px;
  background: var(--color-teal);
  transition: width .4s ease;
  z-index: 2;
}
.vam-progress-bar--stacked .vam-progress-fill--wip {
  position: absolute; top: 0;
  height: 6px; border-radius: 9999px;
  background: var(--color-amber);
  transition: width .4s ease, left .4s ease;
  opacity: .75;
  z-index: 1;
}
.vam-progress-pct { font-size: .8rem; font-weight: 600; color: var(--color-teal); white-space: nowrap; }

.vam-fanout-notice {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.vam-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-border);
}
.vam-card-dates { font-size: .8rem; color: var(--text-secondary); display: flex; gap: 16px; flex-wrap: wrap; }
.vam-overdue-text { color: var(--color-red); font-weight: 600; }
.vam-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Blocked-publish inline notice (replaces inline styles in _blockedPublishHtml) */
.vam-publish-blocked { text-align: right; }
.vam-publish-warn    { font-size: 11px; color: var(--color-gold); margin-bottom: 4px; }
.vam-publish-link    { font-size: 11px; color: var(--color-teal); }

/* No-results / empty inline states */
.vam-no-results { margin: 0; }
.vam-user-dropdown-item--empty { cursor: default; color: var(--text-secondary); }
.lpe-no-modules { padding: 8px; margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Status badges
───────────────────────────────────────────────────────────────────────────── */
.vam-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: .03em;
}
.vam-status-badge--draft    { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.vam-status-badge--active   { background: rgba(0,196,140,.15);  color: var(--color-green); }
.vam-status-badge--paused   { background: var(--color-amber-glow); color: var(--color-amber); }
.vam-status-badge--expired  { background: var(--color-red-glow);   color: var(--color-red); }
.vam-status-badge--archived { background: rgba(255,255,255,0.06); color: var(--text-secondary); opacity:.7; }

/* ─────────────────────────────────────────────────────────────────────────────
   Empty state
───────────────────────────────────────────────────────────────────────────── */
.vam-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 24px;
  color: var(--text-secondary);
  text-align: center;
}
.vam-empty-icon { font-size: 2.5rem; }
.vam-empty-text { font-size: 1rem; font-weight: 500; margin: 0; color: var(--text-primary); }
.vam-empty-sub  { font-size: .875rem; margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Error banner
───────────────────────────────────────────────────────────────────────────── */
.vam-error-banner {
  background: var(--color-red-glow);
  color: var(--color-red);
  border: 1px solid rgba(229,57,53,.35);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .875rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Wizard overlay
───────────────────────────────────────────────────────────────────────────── */
.vam-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 30, .72);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayIn .18s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.vam-wizard-panel {
  background: var(--surface-card);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: panelIn .22s ease;
}
@keyframes panelIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.vam-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
}
.vam-wizard-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; color: var(--text-primary); }

.vam-wizard-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
}
.vam-step {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.vam-step--active { color: var(--color-teal); font-weight: 700; }
.vam-step--done   { color: var(--color-green); }
.vam-step-sep     { color: var(--text-secondary); }

.vam-wizard-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.vam-wizard-close:hover { background: var(--surface-elevated); color: var(--text-primary); }
.vam-wizard-close:focus-visible { outline: 2px solid var(--color-teal); }

.vam-wizard-body {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
}
.vam-wizard-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface-card);
}

/* Wizard step internals */
.vam-wz-step-title { font-size: 1rem; font-weight: 600; margin: 0 0 4px; color: var(--text-primary); }
.vam-wz-step-hint  { font-size: .85rem; color: var(--text-secondary); margin: 0 0 20px; }
.vam-wz-divider    { border: none; border-top: 1px solid var(--surface-border); margin: 18px 0; }
.vam-wz-divider--or {
  position: relative;
  text-align: center;
}
.vam-wz-divider--or span {
  position: relative;
  background: var(--surface-card);
  padding: 0 10px;
  font-size: .78rem;
  color: var(--text-secondary);
  top: -.7em;
}
.vam-wz-error {
  background: var(--color-red-glow);
  color: var(--color-red);
  border: 1px solid rgba(229,57,53,.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: .8rem;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Form controls  — mirrors .form-input from components.css
───────────────────────────────────────────────────────────────────────────── */
.vam-form-field { margin-bottom: 16px; }
.vam-form-row   { display: flex; gap: 16px; flex-wrap: wrap; }
.vam-form-row .vam-form-field { flex: 1; min-width: 160px; }

.vam-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.vam-required { color: var(--color-red); }

.vam-input,
.vam-textarea,
.vam-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.vam-input:focus,
.vam-textarea:focus,
.vam-select:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px var(--color-teal-glow);
}
.vam-input::placeholder,
.vam-textarea::placeholder { color: var(--text-muted); }
.vam-input--sm    { max-width: 100px; }
.vam-input--search { max-width: 260px; }
.vam-textarea     { resize: vertical; min-height: 60px; }
.vam-field-hint   { display: block; font-size: .75rem; color: var(--text-secondary); margin-top: 4px; }

/* Select option text — force dark-theme-friendly on platforms that support it */
.vam-select option {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.vam-range {
  width: 100%;
  accent-color: var(--color-teal);
  cursor: pointer;
}

/* Checkbox group */
.vam-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.vam-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-primary);
  cursor: pointer;
}
.vam-checkbox {
  accent-color: var(--color-teal);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Toggle switch */
.vam-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-top: 4px;
}
.vam-toggle-chk { position: absolute; opacity: 0; width: 0; height: 0; }
.vam-toggle-track {
  position: relative;
  width: 36px; height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 9999px;
  flex-shrink: 0;
  transition: background .2s;
}
.vam-toggle-chk:checked + .vam-toggle-track { background: var(--color-teal); }
.vam-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.vam-toggle-chk:checked + .vam-toggle-track .vam-toggle-thumb { transform: translateX(16px); }
.vam-toggle-chk:focus-visible + .vam-toggle-track { outline: 2px solid var(--color-teal); }

/* ─────────────────────────────────────────────────────────────────────────────
   Module list (wizard step 1)
───────────────────────────────────────────────────────────────────────────── */
.vam-module-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: var(--surface-bg);
  margin-bottom: 4px;
}
.vam-module-empty {
  padding: 24px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-secondary);
}
.vam-module-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--surface-card);
  color: var(--text-primary);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.vam-module-row:hover { background: var(--surface-elevated); border-color: var(--surface-border-mid); }
.vam-module-row--selected { border-color: var(--color-teal); background: var(--surface-elevated); }
.vam-module-row:focus-visible { outline: 2px solid var(--color-teal); }
.vam-module-icon  { font-size: 1.3rem; flex-shrink: 0; }
.vam-module-info  { flex: 1; min-width: 0; }
.vam-module-title { font-size: .875rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vam-module-domain{ font-size: .75rem; color: var(--text-secondary); }
.vam-module-duration { font-size: .75rem; color: var(--text-secondary); }
.vam-module-check { font-weight: 700; color: var(--color-teal); flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Target audience grid (wizard step 2)
───────────────────────────────────────────────────────────────────────────── */
.vam-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.vam-target-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--surface-card);
  color: var(--text-primary);
  text-align: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.vam-target-card:hover { background: var(--surface-elevated); border-color: var(--color-teal); }
.vam-target-card--selected { border-color: var(--color-teal); background: var(--surface-elevated); }
.vam-target-card:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }
.vam-target-icon  { font-size: 1.4rem; }
.vam-target-label { font-size: .78rem; font-weight: 600; color: var(--text-primary); }

.vam-target-filter { margin-top: 8px; }
.vam-target-info {
  font-size: .85rem;
  color: var(--text-secondary);
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Quiz settings block
───────────────────────────────────────────────────────────────────────────── */
.vam-quiz-settings { margin-top: 12px; }
.vam-hidden        { display: none !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   User search chips (wizard Step 2 — Specific Users)
───────────────────────────────────────────────────────────────────────────── */
.vam-chips-wrap {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: text;
}
.vam-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vam-chip-remove {
  background: none;
  border: none;
  color: var(--color-teal);
  cursor: pointer;
  padding: 0;
  font-size: .75rem;
  line-height: 1;
  opacity: .7;
  flex-shrink: 0;
}
.vam-chip-remove:hover { opacity: 1; }

.vam-user-dropdown {
  position: absolute;
  z-index: 1000;
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
}
.vam-user-dropdown-item {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-border);
}
.vam-user-dropdown-item:last-child { border-bottom: none; }
.vam-user-dropdown-item:hover { background: var(--surface-bg); }
.vam-user-dropdown-item__name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.vam-user-dropdown-item__dept {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Draft preview table (wizard step 3)
───────────────────────────────────────────────────────────────────────────── */
.vam-wz-preview {
  margin-top: 20px;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.vam-preview-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.vam-preview-table { width: 100%; border-collapse: collapse; font-size: .83rem; color: var(--text-primary); }
.vam-preview-table td { padding: 4px 8px; vertical-align: top; }
.vam-preview-table td:first-child { color: var(--text-secondary); width: 40%; }

/* ─────────────────────────────────────────────────────────────────────────────
   Pagination
───────────────────────────────────────────────────────────────────────────── */
.vam-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 0;
  font-size: .85rem;
  color: var(--text-secondary);
}
.vap-pag-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────────────────────────────
   Progress Page — KPI row
───────────────────────────────────────────────────────────────────────────── */
.vap-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.vap-kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.vap-kpi-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.vap-kpi-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  font-weight: 600;
}
.vap-kpi--green  .vap-kpi-number { color: var(--color-green); }
.vap-kpi--blue   .vap-kpi-number { color: var(--color-teal); }
.vap-kpi--orange .vap-kpi-number { color: var(--color-amber); }
.vap-kpi--red    .vap-kpi-number { color: var(--color-red); }
.vap-kpi--neutral .vap-kpi-number { color: var(--text-secondary); }

/* ─────────────────────────────────────────────────────────────────────────────
   Progress Page — Ring + breakdown row
───────────────────────────────────────────────────────────────────────────── */
.vap-overview-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.vap-ring-wrap  { flex-shrink: 0; }
.vap-ring       { position: relative; width: 120px; height: 120px; }
.vap-ring-arc   { transition: stroke-dasharray .6s ease; }
.vap-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.vap-ring-pct { font-size: 1.45rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.vap-ring-sub { font-size: .7rem; color: var(--text-secondary); font-weight: 500; }

.vap-breakdown      { flex: 1; min-width: 220px; }
.vap-bd-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.vap-bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.vap-bd-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.vap-bd-label { font-size: .8rem; width: 110px; flex-shrink: 0; color: var(--text-primary); }
.vap-bd-bar-wrap { flex: 1; }
.vap-bd-bar  { height: 6px; background: rgba(255,255,255,0.12); border-radius: 9999px; overflow: hidden; }
.vap-bd-fill { height: 100%; border-radius: 9999px; transition: width .4s ease; }
.vap-bd-val  { font-size: .8rem; font-weight: 600; width: 28px; text-align: right; flex-shrink: 0; color: var(--text-primary); }

/* Colour dots / fills */
.vap-bd--green   { background: var(--color-green); }
.vap-bd--blue    { background: var(--color-teal); }
.vap-bd--neutral { background: rgba(255,255,255,0.25); }
.vap-bd--orange  { background: var(--color-amber); }
.vap-bd--red     { background: var(--color-red); }

/* ─────────────────────────────────────────────────────────────────────────────
   Progress Page — Toolbar
───────────────────────────────────────────────────────────────────────────── */
.vap-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}
.vap-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Progress Page — Table
───────────────────────────────────────────────────────────────────────────── */
.vap-table-wrap {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}
.vap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  color: var(--text-primary);
}
.vap-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-bg);
  white-space: nowrap;
}
.vap-td,
.vap-table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-primary);
}
.vap-td--center { text-align: center; }
.vap-td--actions { white-space: nowrap; }
.vap-row:last-child .vap-td { border-bottom: none; }
.vap-table tbody tr:last-child td { border-bottom: none; }
.vap-row:hover .vap-td { background: var(--surface-elevated); }
.vap-table tbody tr:hover td { background: var(--surface-elevated); }

.vap-overdue-cell { color: var(--color-red); font-weight: 600; }

/* User cell */
.vap-user-cell { display: flex; align-items: center; gap: 10px; }
.vap-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-teal-glow);
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vap-user-name { font-weight: 600; font-size: .875rem; color: var(--text-primary); }
.vap-user-id   { font-size: .7rem; color: var(--text-secondary); font-family: monospace; }

/* Status badge in table */
.vap-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.vap-status--success { background: rgba(0,196,140,.15);  color: var(--color-green); }
.vap-status--info    { background: var(--color-teal-glow); color: var(--color-teal); }
.vap-status--warn    { background: var(--color-amber-glow); color: var(--color-amber); }
.vap-status--error   { background: var(--color-red-glow);   color: var(--color-red); }
.vap-status--neutral { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* Mini watch progress bar */
.vap-watch-cell { display: flex; align-items: center; gap: 6px; min-width: 80px; }
.vap-mini-bar   { flex: 1; height: 5px; background: rgba(255,255,255,0.12); border-radius: 9999px; overflow: hidden; min-width: 40px; }
.vap-mini-fill  { height: 100%; background: var(--color-teal); border-radius: 9999px; transition: width .3s ease; }
.vap-mini-pct   { font-size: .75rem; color: var(--text-secondary); white-space: nowrap; width: 30px; text-align: right; }

/* Quiz badge */
.vap-quiz-badge {
  display: inline-block;
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border-radius: 9999px;
  padding: 1px 8px;
  font-size: .75rem;
  font-weight: 600;
}
.vap-quiz-badge--none { background: transparent; color: var(--text-secondary); }

/* Table error */
.vap-table-error {
  text-align: center;
  padding: 32px;
  color: var(--color-red);
  font-size: .875rem;
}

/* Btn extra-small */
.btn.btn-xs {
  padding: 3px 10px;
  font-size: .75rem;
  border-radius: var(--radius-sm);
}

/* ═════════════════════════════════════════════════════════════════════════════
   MY LEARNING INBOX  (.lms-*)
   MyLearningPage — employee assignment inbox
   Theme: identical to vam-* / vap-* — design-system tokens only.
════════════════════════════════════════════════════════════════════════════ */

/* ── Wrapper & layout ───────────────────────────────────────────────────── */
.lms-inbox-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  font-family: var(--font-body);
  color: var(--text-primary);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.lms-inbox-header {
  margin-bottom: 24px;
}
.lms-inbox-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.lms-inbox-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lms-btn-icon {
  background: none;
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 9px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.lms-btn-icon:hover { color: var(--color-teal); border-color: var(--color-teal); }
.lms-domain-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border: 1px solid rgba(0,180,162,0.25);
  cursor: pointer;
  user-select: none;
}

/* ── Count bar ──────────────────────────────────────────────────────────── */
.lms-count-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.lms-count-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 2px solid var(--surface-border);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.2;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
              box-shadow var(--transition-fast), transform var(--transition-fast);
}
.lms-count-chip:hover {
  background: var(--surface-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.lms-count-chip:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}
.lms-count-chip .lms-count-num {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.1;
}
.lms-count-chip .lms-count-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Default accent colours per chip type */
.lms-count-pending { border-color: rgba(0,180,162,0.3);  color: var(--color-teal);  }
.lms-count-overdue { border-color: rgba(229,57,53,0.3);  color: var(--color-red);   }
.lms-count-done    { border-color: rgba(0,196,140,0.3);  color: var(--color-green); }
.lms-count-all     { border-color: rgba(148,163,184,0.3); color: var(--text-primary); }

/* Active filter chip — solid background + stronger border */
.lms-count-chip--active.lms-count-pending {
  background: rgba(0,180,162,0.12);
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0,180,162,0.15);
}
.lms-count-chip--active.lms-count-overdue {
  background: rgba(229,57,53,0.1);
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(229,57,53,0.12);
}
.lms-count-chip--active.lms-count-done {
  background: rgba(0,196,140,0.1);
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(0,196,140,0.12);
}
.lms-count-chip--active.lms-count-all {
  background: var(--surface-elevated);
  border-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(148,163,184,0.15);
}
.lms-count-chip--active .lms-count-label {
  color: currentColor;
  opacity: 0.75;
}

/* Keep tab bar styles for other usages but no longer rendered on My Learning */
.lms-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.lms-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.lms-tab:hover { color: var(--text-primary); background: var(--surface-card); }
.lms-tab--active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
  font-weight: 600;
}

/* ── Card grid ──────────────────────────────────────────────────────────── */
.lms-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.lms-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-card);
}
.lms-card:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.lms-card:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}
.lms-card--overdue {
  border-color: rgba(229,57,53,0.4);
}
.lms-card--overdue:hover {
  border-color: var(--color-red);
}

/* ── Thumbnail ──────────────────────────────────────────────────────────── */
.lms-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-elevated);
  overflow: hidden;
  flex-shrink: 0;
}
.lms-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-base);
}
.lms-card:hover .lms-card-thumb { transform: scale(1.03); }

.lms-overdue-badge,
.lms-done-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.lms-overdue-badge {
  background: var(--color-red);
  color: #fff;
}
.lms-done-badge {
  background: var(--color-green);
  color: #0a1a0e;
}

/* Play-hint overlay on hover */
.lms-card-thumb-wrap::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.9);
  background: rgba(10,8,30,0.35);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  display: grid;
  place-items: center;
}
.lms-card:hover .lms-card-thumb-wrap::after { opacity: 1; }

/* ── Card body ──────────────────────────────────────────────────────────── */
.lms-card-body {
  padding: 14px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lms-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lms-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.lms-meta-chip {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  white-space: nowrap;
}
.lms-meta-chip--warn {
  background: var(--color-red-glow);
  color: var(--color-red);
  border-color: rgba(229,57,53,0.25);
}
.lms-status-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  white-space: nowrap;
}
.lms-status--done    { background: var(--color-green-glow); color: var(--color-green); }
.lms-status--active  { background: var(--color-teal-glow);  color: var(--color-teal); }
.lms-status--quiz    { background: var(--color-amber-glow); color: var(--color-amber); }
.lms-status--warn    { background: var(--color-amber-glow); color: var(--color-amber); }
.lms-status--error   { background: var(--color-red-glow);   color: var(--color-red); }
.lms-status--expired { background: rgba(255,255,255,0.05);  color: var(--text-muted); }
.lms-status--default { background: var(--surface-elevated); color: var(--text-secondary); }

/* Watch progress bar */
.lms-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lms-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.lms-progress-fill {
  height: 100%;
  background: var(--color-teal);
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
}
.lms-progress-pct {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}
.lms-quiz-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
}
.lms-quiz-badge--pass {
  color: var(--color-green);
}

/* ── Card CTA ───────────────────────────────────────────────────────────── */
.lms-card-cta {
  padding: 10px 16px 14px;
  display: flex;
  justify-content: flex-end;
}
.lms-btn-primary,
.lms-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
  border: none;
}
.lms-btn-primary {
  background: var(--color-teal);
  color: #0a1a14;
  padding: 7px 16px;
  font-size: var(--text-sm);
}
.lms-btn-primary:hover { background: var(--color-teal-hover); }
.lms-btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--surface-border-mid);
  padding: 7px 16px;
  font-size: var(--text-sm);
}
.lms-btn-secondary:hover { background: var(--surface-card-hover); }
.lms-btn--sm { padding: 5px 12px; font-size: var(--text-xs); }
.lms-btn-ghost {
  background: none;
  border: 1px solid var(--surface-border-mid);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.lms-btn-ghost:hover { color: var(--text-primary); border-color: var(--color-teal); }
.lms-btn-ghost:disabled { opacity: 0.4; cursor: default; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.lms-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.lms-page-info {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.lms-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  padding: 32px 0;
  text-align: left;
}
.lms-empty-icon { font-size: 2.5rem; }
.lms-empty-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.lms-empty-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ── Error banner ───────────────────────────────────────────────────────── */
.lms-error-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--color-red-glow);
  border: 1px solid rgba(229,57,53,0.25);
  border-radius: var(--radius-md);
  color: var(--color-red);
  font-size: var(--text-sm);
}

/* ── Skeleton loader ────────────────────────────────────────────────────── */
.lms-skeleton-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.lms-skeleton-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.lms-sk {
  background: linear-gradient(90deg, var(--surface-elevated) 25%, var(--surface-card-hover) 50%, var(--surface-elevated) 75%);
  background-size: 200% 100%;
  animation: lms-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.sk-thumb  { aspect-ratio: 16/9; border-radius: 0; width: 100%; }
.lms-sk-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sk-title  { height: 14px; width: 85%; }
.sk-meta   { height: 10px; width: 60%; }
.sk-bar    { height: 4px;  width: 100%; }

@keyframes lms-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   LEARNING VIEWER  (.vlp-*)
   LearningViewerPage — video player, quiz, completion flow
   Same dark-navy theme, design-system tokens only.
════════════════════════════════════════════════════════════════════════════ */

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.vlp-wrap {
  min-height: 100vh;
  background: var(--surface-bg);
  font-family: var(--font-body);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.vlp-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-hover);
  pointer-events: none;
}
.vlp-toast--success { background: var(--color-green); color: #0a1a0e; }
.vlp-toast--error   { background: var(--color-red);   color: #fff; }
.vlp-toast--info    { background: var(--surface-elevated); color: var(--text-primary); border: 1px solid var(--surface-border-mid); }

/* ── Top navigation bar ─────────────────────────────────────────────────── */
.vlp-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  background: rgba(21,18,46,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  gap: 16px;
  flex-shrink: 0;
}
.vlp-back-btn {
  background: none;
  border: 1px solid var(--surface-border-mid);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.vlp-back-btn:hover { color: var(--color-teal); border-color: var(--color-teal); }
.vlp-topbar-centre {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.vlp-topbar-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vlp-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.vlp-overdue-badge {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--color-red);
  color: #fff;
}
.vlp-deadline-chip {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border-mid);
}
.vlp-domain-badge {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border: 1px solid rgba(0,180,162,0.25);
}
.vlp-ai-badge {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(99,102,241,0.10);
  color: #6366f1;
  border: 1px solid rgba(99,102,241,0.25);
  white-space: nowrap;
}

/* ── Main layout ────────────────────────────────────────────────────────── */
.vlp-main {
  flex: 1;
  padding: 24px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.vlp-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.vlp-left, .vlp-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Viewer controls bar (audience + language selectors) ────────────────── */
.vlp-viewer-controls {
  display: flex;
  align-items: stretch;
  background: var(--surface-elevated, rgba(255,255,255,0.06));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-block-end: 1px solid var(--surface-border, rgba(255,255,255,0.1));
  overflow: hidden;
}
/* Selectors inside the controls bar share the container background */
.vlp-viewer-controls .vlp-variant-selector-wrap {
  background: transparent;
  border-radius: 0;
  border-block-end: none;
  border-inline-end: 1px solid var(--surface-border, rgba(255,255,255,0.1));
}
.vlp-viewer-controls .vlp-variant-selector-wrap:last-child {
  border-inline-end: none;
}
/* Language dropdown is display-only inside the viewer popup (lang is chosen on the LP card) */
.vlp-viewer-controls #vlpLangDropdownWrap select:disabled {
  opacity: 0.7;
  cursor: default;
}

/* ── Video player wrap ──────────────────────────────────────────────────── */
.vlp-player-wrap {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}
.vlp-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Native CC (::cue) sizing — keeps captions readable without letting the
   browser auto-inflate to ~28px in fullscreen. */
.vlp-video::cue {
  font-size: 14px;
  line-height: 1.45;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.80);
  text-shadow: none;
}
/* Shell fullscreen — #vlpPlayerWrap becomes the fullscreen root */
.vlp-player-wrap:fullscreen .vlp-video::cue,
.vlp-player-wrap:-webkit-full-screen .vlp-video::cue {
  font-size: clamp(15px, 2.2vw, 22px);
  line-height: 1.4;
}

/* ── Custom controls ────────────────────────────────────────────────────── */
.vlp-controls {
  background: linear-gradient(to top, rgba(10,8,30,0.95) 0%, transparent 100%);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px 10px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.vlp-seek-wrap { margin-bottom: 6px; }
.vlp-seek-track {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  cursor: pointer;
  overflow: visible;
}
.vlp-seek-watched {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(0,180,162,0.4);
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.vlp-seek-played {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--color-teal);
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.vlp-seek-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-teal);
  box-shadow: 0 0 0 2px rgba(0,180,162,0.4);
  pointer-events: none;
}
.vlp-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vlp-ctrl-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color var(--transition-fast);
}
.vlp-ctrl-btn:hover { color: var(--color-teal); }
.vlp-play-btn { font-size: 1.1rem; }
.vlp-time {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.vlp-watch-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.vlp-watch-mini-label,
.vlp-watch-mini-pct {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}
.vlp-mini-bar {
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.vlp-mini-fill {
  height: 100%;
  background: var(--color-teal);
  border-radius: var(--radius-pill);
  transition: width .5s ease;
}
.vlp-ctrl-group { display: flex; gap: 2px; align-items: center; }
.vlp-controls--replay { opacity: 0.7; }

/* CC button active state */
.vlp-cc-btn--on {
  color: var(--color-teal);
  font-weight: 700;
  outline: 1px solid currentColor;
  border-radius: 2px;
}

/* Speed control wrapper (relative for popup positioning) */
.vlp-speed-wrap {
  position: relative;
}

/* Speed popup menu */
.vlp-speed-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 4px 0;
  min-width: 72px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.vlp-speed-opt {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 5px 12px;
  text-align: right;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}
.vlp-speed-opt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.vlp-speed-opt--active { color: var(--color-teal); font-weight: 600; }

/* ── No video ────────────────────────────────────────────────────────────── */
.vlp-no-video {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.vlp-no-video-icon { font-size: 2rem; }

/* ── Status banners ──────────────────────────────────────────────────────── */
.vlp-completed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-green-glow);
  border: 1px solid rgba(0,196,140,0.3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-green);
}
.vlp-completed-icon {
  font-size: 1.25rem;
  font-weight: 700;
}
.vlp-completed-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vlp-completed-text strong { color: var(--color-green); font-size: var(--text-sm); }
.vlp-completed-text span   { color: var(--text-secondary); font-size: var(--text-xs); }

.vlp-locked-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-red-glow);
  border: 1px solid rgba(229,57,53,0.3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-red);
}
.vlp-locked-icon { font-size: 1.25rem; }
.vlp-locked-banner strong { color: var(--color-red); display: block; margin-bottom: 2px; }
.vlp-locked-banner p { color: var(--text-secondary); font-size: var(--text-xs); margin: 0; }

/* ── Threshold notice ───────────────────────────────────────────────────── */
.vlp-threshold-notice {
  padding: 10px 14px;
  background: var(--color-amber-glow);
  border: 1px solid rgba(196,154,60,0.3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-amber);
}
.vlp-threshold-notice strong { color: var(--color-amber); }

/* ── Key takeaway card ──────────────────────────────────────────────────── */
.vlp-takeaway-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.vlp-takeaway-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.vlp-takeaway-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.vlp-takeaway-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0 0 8px;
}
.vlp-summary-list {
  margin: 0;
  padding-left: 18px;
}
.vlp-summary-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ── Status card (right column) ─────────────────────────────────────────── */
.vlp-status-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vlp-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vlp-status-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vlp-status-chip {
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.vlp-status-chip--assigned           { background: var(--surface-elevated); color: var(--text-secondary); }
.vlp-status-chip--in_progress        { background: var(--color-teal-glow);  color: var(--color-teal); }
.vlp-status-chip--video_complete     { background: var(--color-teal-glow);  color: var(--color-teal); }
.vlp-status-chip--quiz_in_progress   { background: var(--color-amber-glow); color: var(--color-amber); }
.vlp-status-chip--awaiting_signature { background: var(--color-amber-glow); color: var(--color-amber); }
.vlp-status-chip--completed          { background: var(--color-green-glow); color: var(--color-green); }
.vlp-status-chip--failed_escalated   { background: var(--color-amber-glow); color: var(--color-amber); }
.vlp-status-chip--failed_locked      { background: var(--color-red-glow);   color: var(--color-red); }
.vlp-status-chip--expired            { background: rgba(255,255,255,0.05);  color: var(--text-muted); }

.vlp-progress-block { display: flex; flex-direction: column; gap: 6px; }
.vlp-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.vlp-progress-fill {
  height: 100%;
  background: var(--color-teal);
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
}
.vlp-progress-pct {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.vlp-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.vlp-mode-icon { font-size: 1rem; }
.vlp-attempts-row {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.vlp-attempts-row strong { color: var(--text-primary); }

/* Certificate button */
.vlp-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--color-amber-glow);
  color: var(--color-amber);
  border: 1px solid rgba(196,154,60,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.vlp-cert-btn:hover { background: rgba(196,154,60,0.28); }
.vlp-cert-btn--full { width: 100%; justify-content: center; font-size: var(--text-sm); }

/* ── VLP-SCENE Phase 1 — Scene text panel (right column) ────────────────────
   Renders below .vlp-status-card and above .vlp-quiz-panel inside .vlp-right.
   Scene panel supersedes CAP-4 captions on this page in Phase 1 (see arch §9).
   Devanagari / Tamil / Telugu / Kannada / Malayalam / Gujarati / Bengali /
   Punjabi / Oriya Noto Sans fallback stack is MANDATORY on .vlp-scene-item
   to avoid the OS-fallback jitter on Chromium where Indic scripts render in
   a different weight/height than the surrounding UI.
   ────────────────────────────────────────────────────────────────────────── */
.vlp-scene-panel {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Constrain vertical size so the panel scrolls internally rather than pushing
     the quiz panel off screen on shorter viewports. */
  max-height: 480px;
  min-height: 200px;
}
.vlp-scene-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--surface-border);
}
.vlp-scene-panel__title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.vlp-scene-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  /* MR-097: prevent inner scroll from bubbling to the page when the list
     reaches its end — avoids page scroll-hijack on iOS/Android. */
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vlp-scene-item {
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  /* Devanagari / Tamil / Telugu / Kannada / Malayalam / Gujarati / Bengali /
     Punjabi / Oriya script fallback stack — MANDATORY (arch §6.4). */
  font-family:
    var(--font-body),
    'Noto Sans',
    'Noto Sans Devanagari',
    'Noto Sans Tamil',
    'Noto Sans Telugu',
    'Noto Sans Kannada',
    'Noto Sans Malayalam',
    'Noto Sans Gujarati',
    'Noto Sans Bengali',
    'Noto Sans Punjabi',
    'Noto Sans Oriya',
    system-ui,
    sans-serif;
}
.vlp-scene-item__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* MR-098: long single-word labels (Indic scripts occasionally lack spaces)
     must wrap instead of forcing horizontal overflow at 360px. */
  overflow-wrap: break-word;
  word-break: break-word;
}
.vlp-scene-item__narration {
  display: block;
  color: inherit;
  white-space: normal;
  overflow-wrap: break-word;
}
.vlp-scene-item.is-active {
  background: var(--color-teal-glow);
  border-left-color: var(--color-teal);
  color: var(--text-primary);
}
.vlp-scene-item.is-active .vlp-scene-item__label {
  color: var(--color-teal);
}

/* Fallback when scenes=[] — panel not rendered; status card fills the column. */
.vlp-right:not(:has(.vlp-scene-panel)) .vlp-status-card {
  flex: 1 1 auto;
}

/* ── Quiz panel ─────────────────────────────────────────────────────────── */
.vlp-quiz-panel,
.vlp-ack-panel {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Bug-2 fix: prevent panel from overflowing its right-column container.
     When max-wrong-answer threshold is hit, dynamically injected buttons
     and feedback elements can push the panel wider than the column.
     overflow-x:hidden clips any bleed; max-width + box-sizing guarantee
     the panel never exceeds the column width regardless of content. */
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.vlp-quiz-header,
.vlp-ack-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vlp-quiz-icon { font-size: 1rem; }
.vlp-quiz-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.vlp-quiz-question {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}
.vlp-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vlp-option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.vlp-option-label:hover {
  border-color: var(--color-teal);
  background: var(--surface-card-hover);
}
.vlp-option-radio { accent-color: var(--color-teal); margin-top: 2px; flex-shrink: 0; }
.vlp-option-text  { line-height: 1.4; }
/* Bug-2 fix: three-button state (← Previous / Submit Answer / See Results) can
   exceed the panel width on narrow right columns.  flex-wrap:wrap lets buttons
   stack gracefully; gap replaces margin-based spacing so stacked rows breathe.
   max-width:100% + box-sizing prevent any single button escaping the panel. */
.vlp-quiz-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.vlp-submit-action {
  padding: 8px 20px;
  background: var(--color-teal);
  color: #0a1a14;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
}
.vlp-submit-btn:hover { background: var(--color-teal-hover); }
.vlp-submit-btn:disabled { opacity: 0.45; cursor: default; }
.vlp-submit-btn--full { width: 100%; justify-content: center; display: flex; }

.vlp-quiz-feedback {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}
.vlp-quiz-feedback--pass  { background: var(--color-green-glow); color: var(--color-green); }
.vlp-quiz-feedback--fail  { background: var(--color-red-glow);   color: var(--color-red); }
.vlp-quiz-feedback--error { background: var(--color-red-glow);   color: var(--color-red); }
.vlp-quiz-na { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }

/* ── ALCG-QUIZ-NAV-3: Progress dots ─────────────────────────────────────── */
.vlp-quiz-dots {
  display: flex;
  gap: 6px;
  margin: 6px 0 12px;
  flex-wrap: wrap;
}
.vlp-quiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border, #3a3f5c);
  transition: background 0.2s;
}
.vlp-quiz-dot--active    { background: var(--color-primary, #4f8ef7); }
.vlp-quiz-dot--correct   { background: var(--color-success, #22c55e); }
.vlp-quiz-dot--incorrect { background: var(--color-danger,  #ef4444); }

/* ── ALCG-QUIZ-NAV-3: Option locked states ─────────────────────────────── */
.vlp-option--correct   { border-color: var(--color-success, #22c55e) !important; background: rgba(34,197,94,0.08) !important; }
.vlp-option--incorrect { border-color: var(--color-danger,  #ef4444) !important; background: rgba(239,68,68,0.08) !important; }
.vlp-option--selected  { border-color: var(--color-primary, #4f8ef7) !important; }

/* ── ALCG-QUIZ-NAV-3: Summary panel ────────────────────────────────────── */
.vlp-quiz-summary              { padding: 16px 0; }
.vlp-quiz-summary-score        { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; color: var(--color-text-primary, #e2e8f0); }
.vlp-quiz-summary-pct          { font-size: 0.85rem; color: var(--color-text-secondary, #94a3b8); margin-bottom: 16px; }
.vlp-quiz-summary-list         { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.vlp-quiz-summary-item         { border-left: 3px solid var(--color-border, #3a3f5c); padding-left: 10px; }
.vlp-quiz-summary-item--correct   { border-color: var(--color-success, #22c55e); }
.vlp-quiz-summary-item--incorrect { border-color: var(--color-danger,  #ef4444); }
.vlp-quiz-summary-item-q       { font-size: 0.8rem;  color: var(--color-text-secondary, #94a3b8); margin-bottom: 2px; }
.vlp-quiz-summary-item-ans     { font-size: 0.85rem; font-weight: 600; }
.vlp-quiz-summary-item-expl    { font-size: 0.8rem;  color: var(--color-text-secondary, #94a3b8); margin-top: 4px; }
.vlp-quiz-summary-verdict      { font-size: 0.9rem;  font-weight: 600; margin-bottom: 14px; }
.vlp-quiz-summary-verdict--pass { color: var(--color-success, #22c55e); }
.vlp-quiz-summary-verdict--fail { color: var(--color-warning, #f59e0b); }
.vlp-quiz-summary-breakdown    { font-size: 0.85rem; color: var(--color-text-secondary, #94a3b8); margin-bottom: 14px; }
.vlp-quiz-locked-msg           { font-size: 0.85rem; color: var(--color-text-secondary, #94a3b8); }
.vlp-quiz-prev                 { margin-right: 8px; }

/* Bug-1 fix: running score tally shown after each answered question (mid-quiz).
   Hidden via .hidden class until the first result is recorded.
   _renderQuizSummary() hides it again once the full summary takes over. */
.vlp-quiz-tally {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #94a3b8);
  margin: 0;
  padding: 4px 0;
}

/* Bug-1 fix: quiz pass/fail note appended inside the completion banner
   when a learner revisits an already-completed quiz-mode assignment. */
.vlp-quiz-completed-note {
  font-size: var(--text-sm);
  margin: 4px 0 0;
  color: var(--color-text-secondary, #94a3b8);
}

/* Acknowledgement panel */
.vlp-ack-header { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.vlp-ack-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}
.vlp-ack-check { accent-color: var(--color-teal); margin-top: 3px; flex-shrink: 0; }

/* WQG-3-T8: body paragraph and check-row layout inside the ack panel */
.vlp-ack-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.vlp-ack-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
/* Inline error feedback for the ack panel — always error context, no variant classes needed */
.vlp-ack-feedback {
  font-size: var(--text-sm);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-red-glow);
  color: var(--color-red);
}

/* ── Error state ────────────────────────────────────────────────────────── */
.vlp-error-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
}
.vlp-error-icon { font-size: 2.5rem; }
.vlp-error-msg  { font-size: var(--text-base); color: var(--text-secondary); margin: 0; }
.vlp-error-actions { display: flex; gap: 10px; }

/* ── Loading skeleton ───────────────────────────────────────────────────── */
.vlp-skeleton-header {
  height: 56px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--surface-border);
}
.vlp-skeleton-player {
  margin: 24px;
  aspect-ratio: 16/9;
  max-width: 860px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--surface-elevated) 25%, var(--surface-card-hover) 50%, var(--surface-elevated) 75%);
  background-size: 200% 100%;
  animation: lms-shimmer 1.4s infinite;
}

/* ═════════════════════════════════════════════════════════════════════════════
   VIEWER OVERLAY  (.mlp-*)
   In-page modal opened from MyLearningPage — contains LearningViewerPage.
   Position fixed, full-viewport, dark backdrop.
════════════════════════════════════════════════════════════════════════════ */

.mlp-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10,8,30,0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.mlp-overlay[hidden] { display: none; }

.mlp-overlay-inner {
  position: relative;
  flex: 1;
  overflow-y: auto;
  background: var(--surface-bg);
  display: flex;
  flex-direction: column;
}

/* When LearningViewerPage renders inside the overlay, its vlp-wrap
   fills the overlay inner container rather than the viewport. */
.mlp-overlay-inner .vlp-wrap {
  min-height: 100%;
  flex: 1;
}

/* Responsive overlay — on mobile fills the full screen cleanly */
@media (min-width: 768px) {
  .mlp-overlay {
    padding: 24px;
  }
  .mlp-overlay-inner {
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    max-height: calc(100vh - 48px);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   LP Enrolments Page  (.lpe-*)
   LPEnrolmentsPage — route /learning-paths/:id/enrolments
───────────────────────────────────────────────────────────────────────────── */

/* ── Breadcrumb nav ─────────────────────────────────────────────────────── */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.breadcrumb a {
  color: var(--color-teal);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-cur { color: var(--text-secondary); }

/* ── Page header layout ─────────────────────────────────────────────────── */
.lpe-header-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lpe-header-left {
  flex: 1;
  min-width: 0;
}
.lpe-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lpe-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── LP status badge (header) ───────────────────────────────────────────── */
.lpe-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: .03em;
}
.lpe-status-badge--success { background: rgba(0,196,140,.15); color: var(--color-green); border: 1px solid rgba(0,196,140,.25); }
.lpe-status-badge--neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--surface-border); }

/* ── LP assignment envelope status badge variants ───────────────────────── */
.lpe-assign-badge--active   { background: #d1fae5; color: #065f46; border: 1px solid rgba(6,95,70,.25); }
.lpe-assign-badge--paused   { background: #fef3c7; color: #92400e; border: 1px solid rgba(146,64,14,.25); }
/* LA-14-FREEZE: frozen — deep orange palette (distinct from paused amber) */
.lpe-assign-badge--frozen   { background: #fed7aa; color: #7c2d12; border: 1px solid rgba(124,45,18,.25); }
.lpe-assign-badge--archived { background: #fee2e2; color: #991b1b; border: 1px solid rgba(153,27,27,.25); }
.lpe-assign-badge--none     { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--surface-border); }
.lpe-assign-badge--closed   { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--surface-border); }

/* ── Narrow modal modifier (archive confirm dialog) ─────────────────────── */
.adm-modal--sm { max-width: 420px; }

/* ── Search + export row (below filter tabs) ────────────────────────────── */
.lpe-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

/* ── Stage breakdown (collapsible <details>) ────────────────────────────── */
.lpe-stage-details {
  background: var(--surface-card);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.lpe-stage-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px 13px 14px;
  cursor: pointer;
  font-size: .875rem;
  color: var(--text-primary);
  user-select: none;
  list-style: none;
  background: var(--surface-elevated);
  border-left: 3px solid var(--color-teal);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-fast);
}
.lpe-stage-details[open] > .lpe-stage-summary {
  border-bottom-color: var(--surface-border-mid);
}
.lpe-stage-summary::-webkit-details-marker { display: none; }
.lpe-stage-summary::before {
  content: '▶';
  font-size: .6rem;
  color: var(--color-teal);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.lpe-stage-details[open] > .lpe-stage-summary::before {
  transform: rotate(90deg);
}
.lpe-stage-summary:hover { background: var(--surface-card-hover); }

.lpe-stage-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--text-primary);
}

.lpe-stage-count {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.lpe-seq-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--color-teal-glow);
  color: var(--color-teal);
  border: 1px solid rgba(0,180,162,.25);
  white-space: nowrap;
}

.lpe-stage-body {
  padding: 14px 16px 16px;
  background: var(--surface-card);
}

.lpe-stage-body .vap-table-wrap {
  margin-top: 0;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   LEARNING PATH BUILDER  (lpb-*)   LA-13
═══════════════════════════════════════════════════════════════════════════ */
#lpb-body {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr minmax(220px, 300px);
  gap: 16px;
  align-items: flex-start;
}
.lpb-stages-container {
  margin-top: 24px;
}
.lpb-stages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.lpb-stages-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lpb-stage-band {
  background: var(--surface-card);
  border: 1px solid var(--surface-border-mid);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.lpb-stage-band:hover {
  border-color: var(--color-teal);
}
.lpb-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-bg);
}
.lpb-stage-drag {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}
.lpb-stage-drag:hover  { color: var(--text-secondary); }
.lpb-stage-drag:active { cursor: grabbing; }
.lpb-stage-name {
  flex: 1;
  min-width: 0;
  /* inherits adm-input sizing; override border to blend */
  border-color: transparent !important;
  background: transparent !important;
  font-weight: 600;
}
.lpb-stage-name:focus {
  border-color: var(--color-teal) !important;
  background: var(--surface-elevated) !important;
}
.lpb-stage-seq {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lpb-seq-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.lpb-seq-radio {
  accent-color: var(--color-teal);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.lpb-stage-topics {
  padding: 12px 16px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lpb-topics-hint {
  font-size: .78rem;
  color: var(--text-muted);
  font-style: italic;
}
.lpb-topic-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.lpb-topic-chip-name {
  flex: 1;
  font-size: .82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpb-topic-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .85rem;
  padding: 2px 5px;
  line-height: 1;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.lpb-topic-chip-remove:hover {
  color: var(--color-red);
  background: var(--color-red-glow);
}
.lpb-delete-stage {
  flex-shrink: 0;
}
.lpb-empty-stages {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: .85rem;
  border: 1px dashed var(--surface-border-mid);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

/* ── Drag-and-drop topic ordering within a stage band ────────────────────── */
.lpb-topic-chip {
  position: relative;
}
.lpb-topic-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  user-select: none;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
  touch-action: none;
}
.lpb-topic-drag-handle:hover  { color: var(--text-secondary); }
.lpb-topic-drag-handle:active { cursor: grabbing; }
.lpb-topic-chip-num {
  font-size: .72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 18px;
  flex-shrink: 0;
  text-align: end;
}
.lpb-topic-chip--dragging {
  opacity: 0.4;
  border-style: dashed;
}
.lpb-topic-chip--drag-over {
  border-block-start: 2px solid var(--color-teal, #14b8a6);
  margin-block-start: -1px;
}
.lpb-stage-topics--drag-active .lpb-topic-chip:not(.lpb-topic-chip--dragging) {
  transition: transform 120ms ease;
}
.lpb-topic-chip:focus-visible {
  outline: 2px solid var(--color-teal, #14b8a6);
  outline-offset: 2px;
}
.lpb-dnd-saving {
  font-size: .72rem;
  color: var(--text-muted);
  margin-inline-start: 4px;
  font-style: italic;
}
.lpb-dnd-err {
  font-size: .72rem;
  color: var(--color-red, #ef4444);
  margin-inline-start: 4px;
}

/* adm-form-note — helper note below form groups */
.adm-form-note {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  padding: 10px 14px;
  background: var(--surface-card);
  border-left: 3px solid var(--surface-border-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.adm-form-note p { margin: 0; }

/* adm-btn--* BEM aliases (for pages that use double-hyphen syntax) */
.adm-btn--primary  { background: var(--adm-teal, var(--color-teal)); color: #0f1923; font-weight: 700; border: none; }
.adm-btn--primary:hover:not(:disabled) { background: var(--adm-teal-hover, #00c8b4); box-shadow: 0 0 16px rgba(0,180,162,.35); }
.adm-btn--secondary { background: var(--adm-bg-elevated, var(--surface-elevated)); color: var(--text-primary); border: 1px solid var(--surface-border-mid); }
.adm-btn--secondary:hover:not(:disabled) { background: var(--surface-card-hover, #201D4A); border-color: var(--color-teal); }
.adm-btn--ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.adm-btn--ghost:hover:not(:disabled) { background: var(--surface-elevated); color: var(--text-primary); border-color: var(--surface-border-mid); }
.adm-btn--danger { background: var(--color-red-glow); color: var(--color-red); border: 1px solid rgba(229,57,53,.25); }
.adm-btn--danger:hover:not(:disabled) { background: var(--color-red); color: #fff; }
/* LA-14-FREEZE: warning variant for Freeze actions */
.adm-btn--warning { background: #f97316; color: #fff; border-color: #ea580c; }
.adm-btn--warning:hover:not(:disabled) { background: #ea580c; }
.adm-btn--outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--surface-border-mid); }
.adm-btn--outline:hover:not(:disabled) { border-color: var(--color-teal); color: var(--color-teal); }
.adm-btn--sm { padding: 5px 12px; font-size: .78rem; }

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .vam-main, .vap-main { padding: 16px 12px 40px; }
  .vam-card-top { flex-direction: column; }
  .vam-card-kpis { justify-content: flex-start; }
  .vam-wizard-panel { max-height: 98vh; border-radius: var(--radius-md) var(--radius-md) 0 0; align-self: flex-end; }
  .vam-wizard-overlay { align-items: flex-end; padding: 0; }
  .vap-overview-row { flex-direction: column; }

  /* LP Enrolments mobile */
  .lpe-header-layout { flex-direction: column; gap: 12px; }
  .lpe-header-actions { width: 100%; }
  .lpe-page-title { font-size: 1.15rem; }
  .lpe-search-row { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 1024px) {
  .vam-card-kpis { gap: 14px; }
  .vap-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═════════════════════════════════════════════════════════════════════════════
   LP DETAIL PAGE  (.lpd-*)
   LPDetailPage — route /learning/lp/:id
   Shows all modules in a Learning Path with status, progress, and Watch button.
════════════════════════════════════════════════════════════════════════════ */

.lpd-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--surface-bg);
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.lpd-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.lpd-back-btn {
  background: none;
  border: 1px solid var(--surface-border-mid);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.lpd-back-btn:hover { color: var(--color-teal); border-color: var(--color-teal); }
.lpd-topbar-title {
  flex: 1;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpd-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lpd-deadline-chip {
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* ── Main ───────────────────────────────────────────────────────────────── */
.lpd-main {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ── Summary card ───────────────────────────────────────────────────────── */
.lpd-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.lpd-summary-left { flex: 1; min-width: 0; }
.lpd-lp-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
}
.lpd-lp-meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.lpd-overall-bar {
  height: 8px;
  background: var(--surface-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lpd-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-teal), #00e0c8);
  border-radius: 99px;
  transition: width .4s ease;
}
.lpd-overall-pct {
  font-size: .78rem;
  color: var(--text-muted);
}
.lpd-summary-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.lpd-cert-lp-btn {
  background: var(--color-teal);
  color: #0f1923;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.lpd-cert-lp-btn:hover {
  background: #00c8b4;
  box-shadow: 0 0 16px rgba(0,180,162,.35);
}

/* ── Section title ──────────────────────────────────────────────────────── */
.lpd-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.lpd-section-count {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 99px;
  border: 1px solid var(--surface-border-mid);
}

/* ── Module list ────────────────────────────────────────────────────────── */
.lpd-module-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lpd-module-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.lpd-module-card:hover {
  border-color: var(--color-teal);
  background: var(--surface-card-hover, #201D4A);
  box-shadow: 0 2px 12px rgba(0,180,162,.08);
}
.lpd-module-card:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}
.lpd-module-card--overdue { border-left: 3px solid var(--color-red); }
.lpd-module-card--locked { opacity: .55; cursor: default; }
.lpd-module-card--locked:hover {
  border-color: var(--surface-border);
  background: var(--surface-card);
  box-shadow: none;
}
/* LPVAR-1 T5 — content not yet ready for learner's audience */
.lpd-module-card--preparing {
  opacity: .7;
  cursor: default;
}
.lpd-module-card--preparing:hover {
  border-color: var(--surface-border);
  background: var(--surface-card);
  box-shadow: none;
}
.lpd-preparing-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* ── Thumbnail ──────────────────────────────────────────────────────────── */
.lpd-module-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-elevated);
}
.lpd-module-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lpd-done-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,148,136,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  font-weight: 700;
}
.lpd-overdue-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--color-red);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 5px;
  border-radius: 3px;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.lpd-module-body { flex: 1; min-width: 0; }
.lpd-module-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpd-module-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.lpd-meta-chip {
  font-size: .72rem;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  padding: 2px 7px;
  border-radius: 99px;
}
.lpd-meta-chip--warn { border-color: rgba(229,57,53,.4); color: var(--color-red); }

/* Status chip */
.lpd-status-chip {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid transparent;
}
.lpd-status--done    { background: rgba(13,148,136,.15); color: var(--color-teal); border-color: rgba(13,148,136,.3); }
.lpd-status--active  { background: rgba(99,102,241,.12); color: #a5b4fc; border-color: rgba(99,102,241,.3); }
.lpd-status--quiz    { background: rgba(234,179,8,.12);  color: #fbbf24; border-color: rgba(234,179,8,.3); }
.lpd-status--video   { background: rgba(99,102,241,.12); color: #a5b4fc; border-color: rgba(99,102,241,.3); }
.lpd-status--warn    { background: rgba(251,146,60,.12); color: #fb923c; border-color: rgba(251,146,60,.3); }
.lpd-status--error   { background: rgba(229,57,53,.12);  color: var(--color-red); border-color: rgba(229,57,53,.3); }
.lpd-status--expired { background: var(--surface-elevated); color: var(--text-muted); }
.lpd-status--default { background: var(--surface-elevated); color: var(--text-secondary); }

.lpd-quiz-badge {
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-teal);
  background: rgba(13,148,136,.12);
  border: 1px solid rgba(13,148,136,.3);
  padding: 2px 8px;
  border-radius: 99px;
}

/* Watch progress bar */
.lpd-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lpd-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--surface-elevated);
  border-radius: 99px;
  overflow: hidden;
}
.lpd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-teal), #00e0c8);
  border-radius: 99px;
  transition: width .3s;
}
.lpd-progress-pct {
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* ── CTA ────────────────────────────────────────────────────────────────── */
.lpd-module-cta { flex-shrink: 0; }
.lpd-cta-stack { display: flex; flex-direction: column; gap: 6px; }
.lpd-locked-label { font-size: .78rem; color: var(--text-muted); }

.lpd-btn-primary {
  background: var(--color-teal);
  color: #0f1923;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}
.lpd-btn-primary:hover {
  background: #00c8b4;
  box-shadow: 0 0 16px rgba(0,180,162,.35);
}
.lpd-btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border-mid);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.lpd-btn-secondary:hover { border-color: var(--color-teal); color: var(--color-teal); }

/* ── SCORM export bar ───────────────────────────────────────────────────── */
.lpd-scorm-bar {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-border, rgba(255,255,255,.07));
  margin-top: -4px;
}
.lpd-scorm-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}
.lpd-scorm-bar .lpd-btn-secondary {
  padding: 5px 12px;
  font-size: .78rem;
}

/* ── SCORM Export Dialog ─────────────────────────────────────────────────── */
.scorm-dlg-module-name {
  font-size: .83rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-style: italic;
  line-height: 1.4;
}
.scorm-dlg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.scorm-dlg-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.scorm-dlg-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: .75rem;
}
.scorm-dlg-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scorm-dlg-radio-label,
.scorm-dlg-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.4;
}
.scorm-dlg-radio-label input,
.scorm-dlg-check-label input {
  accent-color: var(--color-teal);
  flex-shrink: 0;
  cursor: pointer;
}
.scorm-dlg-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: .83rem;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}
.scorm-dlg-input::placeholder { color: var(--text-muted); }
.scorm-dlg-input:focus {
  outline: none;
  border-color: var(--color-teal);
}
.scorm-dlg-error {
  background: var(--color-red-glow);
  border: 1px solid rgba(229, 57, 53, .3);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: .8rem;
  color: var(--color-red);
  margin-top: 6px;
}

/* Progress state */
.scorm-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 0 20px;
  text-align: center;
}
.scorm-progress-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-border);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: scorm-spin .85s linear infinite;
}
@keyframes scorm-spin { to { transform: rotate(360deg); } }
.scorm-progress-status {
  font-size: .85rem;
  color: var(--text-secondary);
  min-height: 1.5em;
  max-width: 320px;
}

/* Success state */
.scorm-success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  text-align: center;
}
.scorm-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-navy, #0d1b2a);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}
.scorm-success-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.scorm-success-filename {
  font-size: .78rem;
  color: var(--text-secondary);
  word-break: break-all;
  max-width: 380px;
}
.scorm-success-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  font-size: .78rem;
  color: var(--text-secondary);
  text-align: left;
  margin: 4px auto;
}
.scorm-success-meta dt { font-weight: 600; color: var(--text-primary); }
.scorm-hash { font-family: monospace; font-size: .75rem; }
.scorm-idempotent-note {
  font-size: .75rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
  max-width: 360px;
}
.scorm-download-anchor { margin-top: 6px; text-decoration: none; }

/* Error / violation state */
.scorm-error-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.scorm-error-icon {
  font-size: 1.7rem;
  color: #f59e0b;
  text-align: center;
  line-height: 1;
}
.scorm-error-message {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.scorm-violations-list {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.scorm-violations-list strong { color: var(--text-primary); }

/* ── SCORM Import Instructions Dialog ───────────────────────────────────── */
.scorm-instr-subtitle {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Tab bar */
.scorm-instr-tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-card);
}
.scorm-instr-tab {
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.scorm-instr-tab:hover { color: var(--text-primary); }
.scorm-instr-tab--active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
  font-weight: 600;
}

/* Guide content */
.scorm-instr-body { max-height: 420px; overflow-y: auto; }
.scorm-instr-panel { padding: 4px 0; }
.scorm-guide-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.scorm-guide-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin: 0 0 14px;
}
.scorm-guide-steps code {
  font-family: monospace;
  font-size: .82rem;
  background: var(--surface-elevated);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--color-teal);
}
.scorm-guide-note {
  background: var(--surface-elevated);
  border-left: 3px solid var(--color-teal);
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.scorm-guide-note strong { color: var(--text-primary); }
.scorm-guide-note code {
  font-family: monospace;
  font-size: .78rem;
  background: rgba(0, 180, 162, .08);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--color-teal);
}

/* ── Empty / error states ───────────────────────────────────────────────── */
.lpd-empty {
  text-align: center;
  padding: 64px 32px;
  color: var(--text-muted);
  font-size: .9rem;
}
.lpd-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.lpd-error-body {
  text-align: center;
  padding: 64px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lpd-error-icon { font-size: 2rem; }
.lpd-error-msg { color: var(--text-secondary); font-size: .9rem; }

/* ── Loading skeleton ───────────────────────────────────────────────────── */
.lpd-sk {
  background: linear-gradient(90deg,
    var(--surface-elevated) 25%,
    var(--surface-card)     50%,
    var(--surface-elevated) 75%);
  background-size: 200% 100%;
  animation: lpd-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes lpd-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.lpd-sk-back    { height: 32px; width: 120px; }
.lpd-sk-title   { height: 18px; width: 260px; }
.lpd-sk-summary { height: 96px; border-radius: var(--radius-md); margin-bottom: 28px; }
.lpd-sk-card    { height: 96px; border-radius: var(--radius-md); margin-bottom: 10px; }

/* ── LP Group header improvements in MyLearningPage ────────────────────── */
.lms-lp-chevron-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  line-height: 1;
  transition: background .15s;
}
.lms-lp-chevron-btn:hover { background: var(--surface-elevated); }
.lms-lp-name-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  padding: 0;
  line-height: 1.35;
  transition: color .15s;
}
.lms-lp-name-btn:hover { color: var(--color-teal); }
.lms-lp-detail-btn {
  font-size: .72rem;
  padding: 4px 10px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lpd-main { padding: 16px 14px 40px; }
  .lpd-module-card { flex-wrap: wrap; gap: 12px; }
  .lpd-module-thumb-wrap { width: 72px; height: 48px; }
  .lpd-module-body { min-width: 0; }
  .lpd-module-cta { width: 100%; }
  .lpd-btn-primary, .lpd-btn-secondary { width: 100%; text-align: center; }
  .lpd-summary-card { flex-direction: column; }
  .lpd-topbar-title { font-size: .82rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LP Card Capsule — MyLearningPage redesign
   Each learning path renders as one full-width card with an expandable
   topics sub-grid, replacing the old flat group-header + separate container.
═══════════════════════════════════════════════════════════════════════════ */

/* Full-width slot inside the card grid */
.lms-lp-card {
  grid-column: 1 / -1;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-left: 5px solid var(--color-teal);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.lms-lp-card:hover {
  box-shadow: var(--shadow-hover);
}
.lms-lp-card--done {
  border-left-color: var(--color-green, #16a34a);
}
.lms-lp-card--overdue {
  border-left-color: var(--color-red, #dc2626);
}
/* T14.13: paused LP — muted slate accent matches lms-lp-badge--paused */
.lms-lp-card--paused {
  border-left-color: var(--text-muted, #64748b);
  opacity: .85;
}
/* LA-14-FREEZE: frozen LP — deep orange left accent, reduced opacity */
.lms-lp-card--frozen {
  border-left-color: #c2410c;
  opacity: .85;
}
.lms-lp-card--frozen .lms-lp-pbar-fill {
  background: #c2410c;
}

/* ── Card header ────────────────────────────────────────────────────────── */
.lms-lp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  flex-wrap: wrap;
}

/* Left: icon + info stack */
.lms-lp-card-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.lms-lp-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.lms-lp-card-info {
  flex: 1;
  min-width: 0;
}

.lms-lp-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lms-lp-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Status badge pill */
.lms-lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill, 9999px);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.lms-lp-badge--active {
  background: rgba(13,148,136,.12);
  color: var(--color-teal, #0d9488);
  border: 1px solid rgba(13,148,136,.25);
}
.lms-lp-badge--done {
  background: rgba(22,163,74,.12);
  color: var(--color-green, #16a34a);
  border: 1px solid rgba(22,163,74,.25);
}
.lms-lp-badge--overdue {
  background: rgba(220,38,38,.1);
  color: var(--color-red, #dc2626);
  border: 1px solid rgba(220,38,38,.25);
}
.lms-lp-badge--paused {
  background: rgba(100,116,139,.1);
  color: var(--text-muted, #64748b);
  border: 1px solid rgba(100,116,139,.2);
}
/* LA-14-FREEZE: frozen LP badge — deep orange to match card accent */
.lms-lp-badge--frozen {
  background: #fed7aa;
  color: #7c2d12;
  border: 1px solid rgba(124,45,18,.25);
}

.lms-lp-badge--new-content {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(29,78,216,.25);
}

.lms-lp-progress-label {
  font-size: .78rem;
  color: var(--text-secondary);
}

/* Progress bar */
.lms-lp-pbar {
  position: relative;
  height: 8px;
  background: var(--surface-elevated);
  border-radius: 99px;
  overflow: visible;
  max-width: 480px;
}
.lms-lp-pbar-fill {
  height: 100%;
  background: var(--color-teal, #0d9488);
  border-radius: 99px;
  transition: width .4s ease;
  min-width: 0;
}
.lms-lp-card--done .lms-lp-pbar-fill {
  background: var(--color-green, #16a34a);
}
.lms-lp-card--overdue .lms-lp-pbar-fill {
  background: var(--color-red, #dc2626);
}
.lms-lp-card--paused .lms-lp-pbar-fill {
  background: var(--text-muted, #64748b);
}
.lms-lp-pbar-label {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Project attribution tag ─────────────────────────────────────────────── */
.lms-lp-project-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Actions (right side) ────────────────────────────────────────────────── */
.lms-lp-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Primary CTA — "Open Topics →" */
.lms-lp-open-btn {
  background: var(--color-teal, #0d9488);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.lms-lp-open-btn:hover {
  background: var(--color-teal-dark, #0f766e);
  transform: translateY(-1px);
}
.lms-lp-open-btn:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* Certificate action button */
.lms-lp-cert-action-btn {
  background: none;
  border: 1px solid var(--color-green, #16a34a);
  color: var(--color-green, #16a34a);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.lms-lp-cert-action-btn:hover {
  background: rgba(22,163,74,.1);
}

/* Expand/collapse toggle */
.lms-lp-toggle-btn {
  background: none;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.lms-lp-toggle-btn:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}
.lms-lp-toggle-btn:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}
.lms-lp-chevron {
  font-size: .85rem;
  display: block;
  transition: transform .2s ease;
}

/* ── Expandable topics section ───────────────────────────────────────────── */
.lms-lp-topics {
  border-top: 1px solid var(--surface-border);
  padding: 20px 22px;
  background: var(--surface-bg);
}
.lms-lp-topics[hidden] {
  display: none;
}

.lms-lp-topics-empty {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

/* Sub-grid mirrors the parent card grid */
.lms-lp-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* MR-089: Switch header to column so the chevron/toggle never overflows the
     card boundary. flex-shrink:0 on actions is safe in column mode because
     each child takes its own full row. */
  .lms-lp-card-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }
  .lms-lp-card-name   { font-size: .95rem; white-space: normal; }
  .lms-lp-card-left   { width: 100%; }
  .lms-lp-card-actions {
    width: 100%;
    justify-content: flex-end;
    /* Allow the actions row to wrap so cert btn + open btn + chevron all stay
       within the card boundary even when all three are present at once. */
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Make "Open Topics →" fill available space in the actions row */
  .lms-lp-open-btn    { flex: 1; text-align: center; }
  .lms-lp-topics      { padding: 14px 12px; }
  .lms-lp-module-grid { grid-template-columns: 1fr; }
  .lms-lp-pbar        { max-width: 100%; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   SCORM PORTAL SHARED STYLES
   adm-modal-*, adm-btn, adm-form-* classes used by SCORMExportDialog,
   SCORMExportHistory, and SCORMCompletionUploadDialog when rendered inside
   the tenant portal (index.html).  admin.css is not loaded in the tenant
   portal, so these definitions use design-system.css tokens instead.
════════════════════════════════════════════════════════════════════════════ */

@keyframes adm-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes adm-slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Modal overlay */
.adm-modal-backdrop,
.adm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: adm-fade-in 0.15s ease;
}

/* Modal container */
.adm-modal {
  background: var(--surface-card, #1a2236);
  border: 1px solid var(--surface-border-mid, rgba(255,255,255,0.12));
  border-radius: var(--radius-lg, 14px);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
  animation: adm-slide-up 0.2s ease;
}

.adm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--surface-border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}

.adm-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.adm-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.adm-modal-close {
  background: transparent;
  border: 1px solid var(--surface-border-mid, rgba(255,255,255,0.12));
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.adm-modal-close:hover { color: var(--text-primary); border-color: var(--color-teal); }

.adm-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--surface-border, rgba(255,255,255,0.07));
  flex-shrink: 0;
}

/* adm-btn — base button (single-dash variants used by SCORMCompletionUploadDialog) */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  border: none;
  white-space: nowrap;
}
.adm-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.adm-btn-primary {
  background: var(--color-teal, #00b4a2);
  color: #0a0e1a;
}
.adm-btn-primary:hover:not(:disabled) {
  background: #00c8b4;
  box-shadow: 0 0 16px rgba(0, 180, 162, 0.35);
}

.adm-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.adm-btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

/* adm-form-group / adm-label / adm-input / adm-hint / adm-optional / adm-required */
.adm-form-group { margin-bottom: 18px; }

.adm-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.adm-input,
.adm-select,
.adm-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-elevated, rgba(255,255,255,0.05));
  border: 1px solid var(--surface-border-mid, rgba(255,255,255,0.12));
  border-radius: var(--radius-sm, 6px);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body, inherit);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
  box-sizing: border-box;
}
.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
  border-color: var(--color-teal, #00b4a2);
  box-shadow: 0 0 0 3px rgba(0, 180, 162, 0.12);
}
.adm-input::placeholder { color: var(--text-muted); }

.adm-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* File input — style the native "Choose File" button */
.adm-input[type="file"] {
  padding: 6px 10px;
  cursor: pointer;
}
.adm-input[type="file"]::file-selector-button {
  background: var(--color-teal, #00b4a2);
  color: #0a0e1a;
  border: none;
  border-radius: var(--radius-sm, 6px);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.18s ease;
}
.adm-input[type="file"]::file-selector-button:hover {
  background: #00c8b4;
}

.adm-optional {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.adm-required {
  color: var(--color-red, #ef4444);
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REP-4: DocumentTrainingPage — route /learning/documents/:id
   LP-equivalent page for a repository document.
   Mirrors lpd-* layout; uses --dtp-accent CSS variable for brand colour.
═══════════════════════════════════════════════════════════════════════════ */

.dtp-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--surface-bg);
}

.dtp-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.dtp-back-btn {
  background: none;
  border: 1px solid var(--surface-border-mid);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.dtp-back-btn:hover { color: var(--dtp-accent, #1a73e8); border-color: var(--dtp-accent, #1a73e8); }
.dtp-topbar-title {
  flex: 1;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dtp-main {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ── Summary card ───────────────────────────────────────────────────────── */
.dtp-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-left: 4px solid var(--dtp-accent, #1a73e8);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.dtp-summary-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.dtp-summary-body { flex: 1; min-width: 0; }
.dtp-doc-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-all;
}
.dtp-doc-meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.dtp-unassigned-note { color: var(--text-muted); font-style: italic; }
.dtp-overall-bar {
  height: 8px;
  background: var(--surface-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.dtp-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dtp-accent, #1a73e8), #60a5fa);
  border-radius: 99px;
  transition: width .4s ease;
}
.dtp-overall-pct { font-size: .78rem; color: var(--text-muted); }

/* ── Section title ──────────────────────────────────────────────────────── */
.dtp-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.dtp-section-count {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 99px;
  border: 1px solid var(--surface-border-mid);
}

/* ── Topic list ─────────────────────────────────────────────────────────── */
.dtp-topic-list { display: flex; flex-direction: column; gap: 12px; }

.dtp-topic-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dtp-topic-card:hover {
  border-color: var(--dtp-accent, #1a73e8);
  background: var(--surface-card-hover, #201D4A);
  box-shadow: 0 2px 12px rgba(26,115,232,.08);
}
.dtp-topic-card--overdue { border-left: 3px solid var(--color-red); }
.dtp-topic-card--locked { opacity: .55; cursor: default; pointer-events: none; }

/* ── Thumbnail ──────────────────────────────────────────────────────────── */
.dtp-topic-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-elevated);
}
.dtp-topic-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.dtp-done-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,148,136,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  font-weight: 700;
}
.dtp-overdue-badge {
  position: absolute;
  top: 4px; left: 4px;
  background: var(--color-red);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 5px;
  border-radius: 3px;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.dtp-topic-body { flex: 1; min-width: 0; }
.dtp-topic-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dtp-topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dtp-meta-chip {
  font-size: .72rem;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  padding: 2px 7px;
  border-radius: 99px;
}
.dtp-meta-chip--warn { border-color: rgba(229,57,53,.4); color: var(--color-red); }

.dtp-status-chip {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid transparent;
}
.dtp-status--done       { background: rgba(13,148,136,.15); color: var(--color-teal); border-color: rgba(13,148,136,.3); }
.dtp-status--active     { background: rgba(99,102,241,.12); color: #a5b4fc; border-color: rgba(99,102,241,.3); }
.dtp-status--quiz       { background: rgba(234,179,8,.12);  color: #fbbf24; border-color: rgba(234,179,8,.3); }
.dtp-status--video      { background: rgba(99,102,241,.12); color: #a5b4fc; border-color: rgba(99,102,241,.3); }
.dtp-status--warn       { background: rgba(251,146,60,.12); color: #fb923c; border-color: rgba(251,146,60,.3); }
.dtp-status--error      { background: rgba(229,57,53,.12);  color: var(--color-red); border-color: rgba(229,57,53,.3); }
.dtp-status--expired    { background: var(--surface-elevated); color: var(--text-muted); }
.dtp-status--unassigned { background: var(--surface-elevated); color: var(--text-muted); font-style: italic; }
.dtp-status--default    { background: var(--surface-elevated); color: var(--text-secondary); }

.dtp-quiz-badge {
  font-size: .7rem; font-weight: 700;
  color: var(--color-teal);
  background: rgba(13,148,136,.12);
  border: 1px solid rgba(13,148,136,.3);
  padding: 2px 8px;
  border-radius: 99px;
}

.dtp-progress-row { display: flex; align-items: center; gap: 8px; }
.dtp-progress-bar { flex: 1; height: 5px; background: var(--surface-elevated); border-radius: 99px; overflow: hidden; }
.dtp-progress-fill { height: 100%; background: linear-gradient(90deg, var(--dtp-accent, #1a73e8), #60a5fa); border-radius: 99px; transition: width .3s; }
.dtp-progress-pct { font-size: .72rem; color: var(--text-muted); white-space: nowrap; min-width: 32px; text-align: right; }

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.dtp-topic-cta { flex-shrink: 0; }
.dtp-cta-stack { display: flex; flex-direction: column; gap: 6px; }
.dtp-locked-label { font-size: .78rem; color: var(--text-muted); }
.dtp-unassigned-label { font-size: .78rem; color: var(--text-muted); font-style: italic; }

.dtp-btn-primary {
  background: var(--dtp-accent, #1a73e8);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s, box-shadow .15s;
}
.dtp-btn-primary:hover { filter: brightness(1.12); box-shadow: 0 0 14px rgba(26,115,232,.35); }

.dtp-btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border-mid);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.dtp-btn-secondary:hover { border-color: var(--dtp-accent, #1a73e8); color: var(--dtp-accent, #1a73e8); }

/* ── Empty + error ──────────────────────────────────────────────────────── */
.dtp-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.dtp-empty-icon { font-size: 2.4rem; margin-bottom: 10px; }
.dtp-error-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
}
.dtp-error-icon { font-size: 2.4rem; }
.dtp-error-msg { font-size: .95rem; color: var(--text-secondary); }

/* ── Skeleton ───────────────────────────────────────────────────────────── */
.dtp-sk {
  background: var(--surface-elevated);
  border-radius: var(--radius-sm);
  animation: dtp-shimmer 1.4s ease-in-out infinite;
}
@keyframes dtp-shimmer {
  0%,100% { opacity: .5; }
  50%      { opacity: .9; }
}
.dtp-sk-back    { width: 90px; height: 30px; }
.dtp-sk-title   { flex: 1; height: 16px; }
.dtp-sk-summary { height: 100px; margin-bottom: 28px; border-radius: var(--radius-md); }
.dtp-sk-card    { height: 84px; border-radius: var(--radius-md); margin-bottom: 10px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dtp-main { padding: 16px 14px 40px; }
  .dtp-topic-card { flex-wrap: wrap; gap: 12px; }
  .dtp-topic-thumb-wrap { width: 72px; height: 48px; }
  .dtp-topic-body { min-width: 0; }
  .dtp-topic-cta { width: 100%; }
  .dtp-btn-primary, .dtp-btn-secondary { width: 100%; text-align: center; }
  .dtp-summary-card { flex-direction: column; }
  .dtp-topbar-title { font-size: .82rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   AdminCertificatesPage  (.acp-*)
   CERT-CHRO-1 — Tenant-wide certificate admin view
───────────────────────────────────────────────────────────────────────────── */

.acp-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acp-subtitle {
  margin: 4px 0 0;
  font-size: .85rem;
  color: var(--text-muted, #64748b);
}

.acp-back-link {
  display: inline-block;
  margin-block-start: 4px;
  font-size: .82rem;
  color: var(--color-teal, #00b4a2);
  text-decoration: none;
}
.acp-back-link:hover { text-decoration: underline; }
.acp-back-link:focus-visible {
  outline: 2px solid var(--color-teal, #00b4a2);
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   AdminCertificatesPage filter bar (`_buildFilterBar()`, ~line 324) —
   FIFTH confirmed instance of the `.adm-filter-bar-group` root-cause bug
   this session: the label-stacked-over-control filter wrapper has no CSS
   rule anywhere in this tenant-portal SPA's loaded stylesheets.
   components.css only ships two UNSCOPED rules written for an OLD flat
   flex-ROW `.adm-filter-bar` layout, not for the flex-COLUMN
   `.adm-filter-bar-group` wrapper this page (and its four precedents)
   actually use — see those files' header comments for the full mechanism:
     - frontend/assets/css/rpt-landing-page.css (`.rpt-landing-page`)
     - frontend/assets/css/rpt-detail-page.css   (`.rpt-detail-page`)
     - frontend/assets/css/glpd-dashboard.css    (`.glpd-dashboard-page`)
     - frontend/assets/css/auditor.css           (`.aem-page`)
     - frontend/assets/css/posh.css              (`.posh-page-wrap` + `.adm-cjp-filter-bar`)

   Distinguishing details specific to this page (verified, not assumed):

   1. Unlike rpt-detail-page/auditor/posh (whose `<select>` filters carry
      only `.adm-select`/`.adm-select-sm`, immune to the ballooning-height
      bug), this page's status `<select>` uses class list
      "adm-input adm-input-sm adm-select-sm" — it DOES carry `.adm-input`,
      so it IS subject to components.css's `.adm-filter-bar .adm-input
      { flex: 1 1 200px }` height-misread bug and needs the same
      neutralization as the text/date inputs. A single `> .adm-input`
      child-combinator selector below covers all five controls (3 inputs +
      1 select, all of which carry `.adm-input`) without needing a
      separate `.adm-select` rule.

   2. The 5th (Apply/Reset) group carries ONLY `style="align-self:flex-
      end"` inline — no inline `flex-direction:row` override (unlike
      auditor.css's AEM page, whose actions group has a full inline row
      override, and unlike rpt-detail-page.css, whose actions group uses a
      dedicated `.adm-filter-bar-group--actions` class). Without an
      explicit row re-assertion, Apply/Reset would stack vertically once
      the flex-column default below applies, breaking Reset's own
      `style="margin-inline-start:6px"` (which only makes sense in a row).
      Fixed via `#acpFilterBar` ID scoping below (`#acpFilterBar` is a
      unique per-page element ID, safe to use without a dedicated JS-side
      modifier class) rather than a JS change, per this ticket's
      instruction to avoid touching JS if an equally-clean CSS-only fix
      exists.

   Scoped to `.acp-wrap`, the wrapper class this page's root element
   carries (grep-confirmed used only by AdminCertificatesPage.js /
   learning-admin.css — no collision risk).
   ───────────────────────────────────────────────────────────────────────── */

.acp-wrap .adm-filter-bar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Ballooning-height neutralization — see point 1 above. Matches the text/
   date inputs (`.adm-input.adm-input-sm`) AND the status select (`.adm-
   input.adm-input-sm.adm-select-sm`), since all five controls carry the
   base `.adm-input` class. */
.acp-wrap .adm-filter-bar-group > .adm-input {
  flex: none;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Re-assert the intended small-caps filter-label look at higher
   specificity than components.css's unscoped ".adm-filter-bar .adm-
   filter-label" (written for an inline checkbox-label use case — without
   this, the label runs straight into the control instead of stacking). */
.acp-wrap .adm-filter-bar .adm-filter-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-text-muted, #6b7280);
}

/* Apply/Reset actions group — see point 2 above. This group has no
   dedicated modifier class, so it is targeted by position (last child of
   the filter bar) scoped to this page's unique filter-bar element ID. */
#acpFilterBar .adm-filter-bar-group:last-child {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .acp-wrap .adm-filter-bar-group > .adm-input {
    min-height: 44px;
  }
}

/* ── Loading state ───────────────────────────────────────────────────────── */

.acp-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text-muted, #64748b);
  font-size: .875rem;
}

.acp-loading-text {
  font-size: .875rem;
  color: var(--text-muted, #64748b);
}

.acp-loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--surface-border, #1e293b);
  border-top-color: var(--color-teal, #00b4a2);
  border-radius: 50%;
  animation: acp-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes acp-spin {
  to { transform: rotate(360deg); }
}

/* ── Empty + error states ────────────────────────────────────────────────── */

.acp-empty,
.acp-error {
  padding: 40px;
  text-align: center;
  font-size: .875rem;
  color: var(--text-muted, #64748b);
}

.acp-error {
  color: var(--color-red, #f87171);
  background: rgba(248, 113, 113, .08);
  border-radius: var(--adm-radius, 8px);
}

/* CERT-REGEN FE.6 fix: inline error banner inside the regen modal itself.
   The page-level #acpToast sits underneath .adm-modal-backdrop (z-index 1000,
   inset:0) whenever a modal is open, so a toast fired from inside a modal's
   error handler is invisible to the user until it auto-dismisses — this banner
   renders inside the modal body instead, where it's actually seen. */
.acp-regen-modal-error {
  margin-top: 0.75rem;
  padding: 10px 14px;
  background: rgba(248, 113, 113, .1);
  border: 1px solid rgba(248, 113, 113, .3);
  border-radius: var(--adm-radius, 8px);
  color: var(--color-red, #f87171);
  font-size: .85rem;
  line-height: 1.5;
}

/* ── Certificate table — fixed column layout ─────────────────────────────── */

.acp-cert-table {
  table-layout: fixed;
  min-width: 1050px;
}

.acp-cert-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions cell may wrap (contains button + cert-ref) */
.acp-cert-table tbody td:last-child {
  white-space: normal;
  overflow: visible;
}

/* ── Table helpers ───────────────────────────────────────────────────────── */

.acp-module-sub {
  display: block;
  font-size: .75rem;
  color: var(--text-muted, #64748b);
  margin-block-start: 2px;
}

.acp-muted {
  color: var(--text-muted, #64748b);
  font-size: .8rem;
}

.acp-pdf-link {
  font-size: .8rem;
  padding: 3px 8px;
}

.acp-cert-ref {
  display: block;
  font-size: .7rem;
  color: var(--text-muted, #64748b);
  font-family: var(--font-mono, monospace);
  margin-block-start: 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}

.acp-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Guard against the action column's fixed width being exceeded by a
   long/translated button label — .adm-btn is white-space:nowrap with no
   size cap, so without this it silently overflows the cell (see the
   Regenerate PDF button overflow fixed alongside the acp-cert-table
   colgroup width). */
.acp-action-wrap .adm-btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CERT-INTEG-1 T9 — Flagged tab: failed-module list + revoked badge spacing */
.acp-failed-modules-list {
  margin: 0;
  padding-inline-start: 18px;
  font-size: .8rem;
  color: var(--text-muted, #64748b);
}

.acp-failed-modules-list li {
  line-height: 1.5;
}

.acp-revoked-badge {
  margin-block-start: 4px;
  display: inline-block;
}

/* ── Pagination bar ──────────────────────────────────────────────────────── */

.acp-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 4px;
}

.acp-pagination-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acp-page-info {
  font-size: .8rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}

.avp-page-btn--active {
  background: var(--color-teal-glow, rgba(0,180,162,.15));
  border-color: var(--color-teal, #00b4a2);
  color: var(--color-teal, #00b4a2);
  font-weight: 600;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.acp-toast {
  padding: 10px 16px;
  border-radius: var(--adm-radius, 8px);
  font-size: .85rem;
  font-weight: 500;
  max-width: 480px;
}
.acp-toast--success { background: var(--adm-green-glow, rgba(52,211,153,.15)); color: var(--adm-green, #34d399); border: 1px solid var(--adm-green, #34d399); }
.acp-toast--error   { background: rgba(248,113,113,.12); color: var(--color-red, #f87171); border: 1px solid var(--color-red, #f87171); }
.acp-toast--info    { background: var(--adm-bg-card, #141a2e); color: var(--text-primary, #e2e8f0); border: 1px solid var(--surface-border, #1e293b); }

/* ── Export modal helpers ────────────────────────────────────────────────── */

.acp-export-filter-summary {
  font-size: .82rem;
  color: var(--text-muted, #64748b);
  margin: 0 0 16px;
  line-height: 1.5;
}

.acp-field-hint {
  display: block;
  font-size: .75rem;
  color: var(--text-muted, #64748b);
  margin-block-start: 4px;
}

.acp-export-ready-msg {
  font-size: .9rem;
  font-weight: 600;
  color: var(--adm-green, #34d399);
  margin: 0 0 8px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .acp-wrap { padding: 16px 14px 40px; }
  .acp-pagination-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 375px) {
  /* Stack filter bar vertically on mobile — MR-066: canonical 375px breakpoint */
  .adm-filter-bar { flex-direction: column; align-items: stretch; }
}

/* ── CERT-PDF-1: LP card inline PDF status panel ────────────────────────── */

.lms-lp-pdf-panel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lms-lp-pdf-spinner {
  display: inline-block;
  animation: lms-spin 1s linear infinite;
  font-size: 0.85rem;
}

@keyframes lms-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lms-lp-pdf-spinner { animation: none; }
}

.lms-lp-pdf-status-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.lms-lp-pdf-status-label--error {
  color: var(--color-red, #E53935);
}

/* ── CERT-PDF-1: Public verification page ───────────────────────────────── */

/*
 * .cert-verify-layout  — outer centering wrapper (extends .auth-layout)
 * .cert-verify-card    — outer card (extends .card .auth-card)
 */

.cert-verify-layout {
  /* auth-layout already provides min-height + place-items:center */
  padding: var(--space-6);
}

.cert-verify-card {
  /* auth-card already provides max-width:420px + padding */
  text-align: center;
  max-width: 480px;

  /* CERT-INTEG-1 QA B42 fix (axe-core color-contrast, serious impact):
     the shared --text-muted token (rgba(237,232,219,0.38)) renders at only
     3.07:1 against --surface-card (#1B1840) on this page — below WCAG 2.1 AA's
     4.5:1 minimum for normal text. --text-muted is reused across dozens of
     authenticated, non-violating surfaces elsewhere in the app, so it is not
     safe to raise its opacity globally from here; this card carries its own
     scoped override instead. 55% opacity measured at 4.997:1 (verified via
     axe-core re-scan) — safely above the 4.5:1 floor while keeping the
     "muted" visual weight the design intends. This page is public/unauthenticated
     (reachable directly from a QR code), so it gets the stricter local fix. */
  --cert-verify-muted: rgba(237, 232, 219, 0.55);
}

/* Light theme's --text-muted (#6B7280 on #FFFFFF, 4.83:1) already clears AA —
   no local override needed, just point back at the shared token. */
[data-theme="light"] .cert-verify-card {
  --cert-verify-muted: var(--text-muted);
}

.cert-verify-brand {
  margin-bottom: var(--space-6);
}

/* Status icon ─────────────────────────────────────────────────────────────*/

.cert-verify-icon {
  margin: 0 auto var(--space-4);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-verify-icon--valid {
  background: var(--color-green-glow, rgba(0,196,140,0.15));
  color: var(--color-green, #00C48C);
}

.cert-verify-icon--invalid {
  background: var(--color-red-glow, rgba(229,57,53,0.15));
  color: var(--color-red, #E53935);
}

/* CERT-INTEG-1 T10 — revoked state: amber/warning, distinct from the red
   "not found" invalid state. This certificate WAS valid; it no longer is. */
.cert-verify-icon--revoked {
  background: var(--color-amber-glow, rgba(196,154,60,0.18));
  color: var(--color-amber, #C49A3C);
}

/* Headings ─────────────────────────────────────────────────────────────── */

.cert-verify-heading {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.cert-verify-heading--valid  { color: var(--color-green, #00C48C); }
.cert-verify-heading--invalid { color: var(--color-red,  #E53935); }
.cert-verify-heading--revoked { color: var(--color-amber, #C49A3C); }

.cert-verify-tagline {
  font-size: var(--text-sm, 0.875rem);
  color: var(--cert-verify-muted, var(--text-muted));
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

/* Detail fields ─────────────────────────────────────────────────────────── */

.cert-verify-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-4);
  text-align: start;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--surface-border, rgba(255,255,255,0.08));
}

.cert-verify-detail-label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cert-verify-muted, var(--text-muted));
  white-space: nowrap;
  padding-block-start: 2px;
}

.cert-verify-detail-value {
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-primary);
  font-weight: 500;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Loading state ────────────────────────────────────────────────────────── */

.cert-verify-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) 0;
}

.cert-verify-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-border, rgba(255,255,255,0.12));
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: cert-spin 0.9s linear infinite;
}

@keyframes cert-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cert-verify-spinner { animation: none; border-top-color: var(--color-teal); }
}

.cert-verify-loading-label {
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-muted);
}

/* TAG-7 T7.5 — LP detail language chips (wizard step 1) */
.lpd-lang-chips {
  margin-block-start: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* TAG-7 T7.6 — LP allocation wizard language note (wizard step 3) */
.lpalloc-lang-note {
  font-size: 0.875rem;
  color: var(--adm-text-muted, #6b7280);
  margin: 0.5rem 0 0;
}

/* Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 375px) {
  .cert-verify-card {
    padding: var(--space-6) var(--space-4);
  }
  .cert-verify-details {
    grid-template-columns: 1fr;
  }
  .cert-verify-detail-label {
    margin-block-end: 0;
  }
}

/* MR-5: learning page tap targets — vam-tab (33px), lms-lp-open-btn (31px),
   lms-lp-toggle-btn (30px), lms-btn-primary (27px) all below WCAG 2.5.5 44px minimum
   MR-091: lms-lp-cert-action-btn (30px) was missed in the original MR-5 fix. */
@media (max-width: 768px) {
  .vam-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .lms-lp-open-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .lms-lp-toggle-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* MR-091: certificate action button — same 44px minimum */
  .lms-lp-cert-action-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .lms-btn-primary,
  .lms-btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ── Light theme: adm-btn--* overrides for learning pages ───────────────────
   Brand indigo for primary CTAs; teal reserved for status indicators/badges.
   Secondary hover previously hardcoded #201D4A dark bg — replaced with light values.
   Ghost hover used var(--surface-elevated) = #FFFFFF in light (invisible) — fixed. */
[data-theme="light"] .adm-btn--primary,
[data-theme="light"] .adm-btn.adm-btn--primary {
    background: #0D9488 !important;
    color: #EFF6FF !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(13,148,136,0.22) !important;
}
[data-theme="light"] .adm-btn--primary:hover:not(:disabled),
[data-theme="light"] .adm-btn.adm-btn--primary:hover:not(:disabled) {
    background: #0F766E !important;
    color: #EFF6FF !important;
    box-shadow: 0 4px 16px rgba(13,148,136,0.28) !important;
}
[data-theme="light"] .adm-btn--secondary {
    background: #FFFFFF;
    color: #111827;
    border-color: rgba(0,0,0,0.20);
}
[data-theme="light"] .adm-btn--secondary:hover:not(:disabled) {
    background: #F7F8FA;
    border-color: #00897B;
    color: #00897B;
}
[data-theme="light"] .adm-btn--ghost {
    color: #374151;
}
[data-theme="light"] .adm-btn--ghost:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
    border-color: rgba(0,0,0,0.16);
}

/* ── Light theme: lms-btn-* (MyLearningPage) ────────────────────────────── */
[data-theme="light"] .lms-btn-primary {
    background: #0D9488;
    color: #EFF6FF;
    box-shadow: 0 2px 8px rgba(13,148,136,0.22);
}
[data-theme="light"] .lms-btn-primary:hover {
    background: #0F766E;
    color: #EFF6FF;
    box-shadow: 0 4px 16px rgba(13,148,136,0.28);
}
[data-theme="light"] .lms-btn-secondary {
    background: #FFFFFF;
    color: #111827;
    border-color: rgba(0,0,0,0.20);
}
[data-theme="light"] .lms-btn-secondary:hover {
    background: #F7F8FA;
    border-color: #00897B;
    color: #00897B;
}
[data-theme="light"] .lms-btn-ghost {
    color: #374151;
    border-color: rgba(0,0,0,0.16);
}
[data-theme="light"] .lms-btn-ghost:hover:not(:disabled) {
    color: #111827;
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.24);
}

/* ── Light theme: lms-lp-open-btn / lms-lp-cert-action-btn ─────────────── */
[data-theme="light"] .lms-lp-open-btn {
    background: #0D9488;
    color: #EFF6FF;
}
[data-theme="light"] .lms-lp-open-btn:hover {
    background: #0F766E;
    transform: translateY(-1px);
}
[data-theme="light"] .lms-lp-cert-action-btn {
    background: transparent;
    border-color: #00897B;
    color: #00897B;
}
[data-theme="light"] .lms-lp-cert-action-btn:hover {
    background: rgba(0,137,123,0.08);
    color: #006B62;
    border-color: #006B62;
}

/* ── Light theme: lpd-btn-* (LPDetailPage) ──────────────────────────────── */
[data-theme="light"] .lpd-btn-primary {
    background: #0D9488;
    color: #EFF6FF;
    box-shadow: 0 2px 8px rgba(13,148,136,0.22);
}
[data-theme="light"] .lpd-btn-primary:hover {
    background: #0F766E;
    box-shadow: 0 4px 16px rgba(13,148,136,0.28);
}
[data-theme="light"] .lpd-btn-secondary {
    background: #FFFFFF;
    color: #111827;
    border-color: rgba(0,0,0,0.20);
}
[data-theme="light"] .lpd-btn-secondary:hover {
    background: #F7F8FA;
    border-color: #00897B;
    color: #00897B;
}

/* ── Light theme: adm-btn-primary / adm-btn-ghost single-dash (HrisSyncPage) */
[data-theme="light"] .adm-btn-primary {
    background: #0D9488;
    color: #EFF6FF;
    box-shadow: 0 2px 8px rgba(13,148,136,0.22);
}
[data-theme="light"] .adm-btn-primary:hover:not(:disabled) {
    background: #0F766E;
    color: #EFF6FF;
    box-shadow: 0 4px 16px rgba(13,148,136,0.28);
}
[data-theme="light"] .adm-btn-ghost {
    color: #374151;
}
[data-theme="light"] .adm-btn-ghost:hover:not(:disabled) {
    background: rgba(0,0,0,0.06);
    color: #111827;
    border-color: rgba(0,0,0,0.16);
}

/* ── Light theme: adm-btn-secondary single-dash (missing from previous block) */
[data-theme="light"] .adm-btn-secondary {
    background: #FFFFFF;
    color: #111827;
    border-color: rgba(0,0,0,0.20);
}
[data-theme="light"] .adm-btn-secondary:hover:not(:disabled) {
    background: #F7F8FA;
    border-color: #00897B;
    color: #00897B;
}

/* ── Light theme: adm-btn--outline BEM double-dash */
[data-theme="light"] .adm-btn--outline {
    background: #FFFFFF;
    color: #00897B;
    border-color: #00897B;
}
[data-theme="light"] .adm-btn--outline:hover:not(:disabled) {
    background: rgba(0,137,123,0.08);
    color: #006B62;
    border-color: #006B62;
}

/* ── Light theme: dtp-btn-secondary (DeadlineTrackerPage — dark surface-elevated) */
[data-theme="light"] .dtp-btn-secondary {
    background: #FFFFFF;
    color: #111827;
    border-color: rgba(0,0,0,0.20);
}
[data-theme="light"] .dtp-btn-secondary:hover {
    background: #F7F8FA;
    border-color: #1a73e8;
    color: #1a73e8;
}

/* ── Light theme: native file-input button (HRIS Upload CSV tab) ─────────── */
[data-theme="light"] .adm-input[type="file"]::file-selector-button {
    background: #0D9488;
    color: #EFF6FF;
}
[data-theme="light"] .adm-input[type="file"]::file-selector-button:hover {
    background: #0F766E;
}

/* TAG-3 T3.6 — Per-module language selector row in LPDetailPage */
.lpd-lang-selector-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--surface-border, rgba(255,255,255,0.07));
}
.lpd-lang-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-teal, #2cc1a8);
  background: rgba(44,193,168,.12);
  border: 1px solid rgba(44,193,168,.3);
  border-radius: 4px;
  padding: 2px 8px;
}
.lpd-lang-selector-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lpd-lang-select {
  font-size: .72rem;
  padding: 3px 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border-mid);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  min-width: 120px;
}
.lpd-lang-select:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 1px;
}
.lpd-lang-unavail-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: .7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.5;
  flex-basis: 100%;
}
.lpd-lang-unavail-note__icon {
  flex-shrink: 0;
  font-style: normal;
}

/* MR-5: P8 sub-12px label/meta elements in learning pages — vam-publish-warn/link (11px),
   vam-kpi-lbl uses .7rem (~11.2px), vam-status-badge uses .72rem (~11.5px),
   dal/asp metadata labels, adm-optional (11px) */
@media (max-width: 768px) {
  .vam-publish-warn,
  .vam-publish-link,
  .adm-optional,
  .dal-topic-desc,
  .dal-allocated-badge,
  .asp-topic-stamped-tag,
  .asp-topic-pending-tag {
    font-size: 12px;
  }
  /* rem-based sizes that compute below 12px in mobile user-agent context */
  .vam-kpi-lbl {
    font-size: 12px;
  }
  .vam-status-badge {
    font-size: 12px;
  }
}

/* ── VMGMT-3: Audience Type UX — Assignment Creation Wizard ──────────────── */

.vam-wz-audience-section {
  margin-block: 20px;
  padding: 16px;
  border: 1px solid var(--surface-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  background: var(--surface-hover, #f9fafb);
}

/* Variant readiness warning banner */
.vam-variant-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-block-start: 12px;
  border-radius: var(--radius-sm, 6px);
  background: var(--color-warning-bg, #fffbeb);
  border: 1px solid var(--color-warning-border, #fde68a);
  color: var(--color-warning-text, #92400e);
  font-size: .875rem;
}

.vam-variant-warning-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--color-warning, #d97706);
}

.vam-variant-warning-text {
  flex: 1;
  line-height: 1.5;
}

.vam-variant-warning-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-warning, #d97706);
  padding: 0;
  margin-inline-start: auto;
  opacity: .7;
  transition: opacity .15s;
}

.vam-variant-warning-dismiss:hover,
.vam-variant-warning-dismiss:focus-visible {
  opacity: 1;
  outline: 2px solid var(--focus-ring, #6366f1);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .vam-variant-warning-dismiss { transition: none; }
}

@media (max-width: 768px) {
  /* MR-067: canonical 768px breakpoint (was 640px) */
  .vam-wz-audience-section { padding: 12px; }
  .vam-variant-warning { flex-direction: column; gap: 6px; }
}

/* ── LPMOD-1: Module-list disclosure panel on LP cards ───────────────────── */

/* Trigger row — sits between .vam-card-top and the panel, outside .vam-card-kpis */
.vam-card .lp-module-preview-trigger-row {
  padding: 8px 0 2px;
}

/* Toggle button — full UA reset so no browser button border bleeds through */
.vam-card .lp-module-preview-toggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-family: var(--font-body, inherit);
  color: var(--color-teal);
  cursor: pointer;
  line-height: 1;
}
.vam-card .lp-module-preview-toggle:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: 2px;
}
.vam-card .lp-module-preview-toggle .chevron {
  display: inline-block;
  transition: transform 0.2s ease;
}
.vam-card .lp-module-preview-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Disclosure panel */
.vam-card .lp-module-preview {
  margin: 6px 0 0;
  padding: 10px 0 4px 20px;
  border-top: 1px solid var(--surface-border);
}

/* "MODULES IN THIS PATH" cap label — smaller and muted, clearly subordinate */
.vam-card .lp-module-preview__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

/* Ordered module list — visually smaller than the card title (1.05rem) */
.vam-card .lp-module-preview__list {
  list-style: decimal;
  padding-inline-start: 16px;
  margin: 0;
}
.vam-card .lp-module-preview__list li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ── Sprint MADM-2 Mobile Responsiveness Fixes ──────────────────────────────
   MR-057: .vlp-layout has a fixed 360px right column — at 375px this leaves
           only ~15px for the main video content column.
   MR-058: #lpb-body has a 3-column layout with minmax(220px,...) — minimum
           width is 660px+ which always overflows a mobile viewport.
   MR-066: @media (max-width: 480px) changed to canonical 375px.
   MR-067: @media (max-width: 640px) changed to canonical 768px (see below).
   ─────────────────────────────────────────────────────────────────────────── */

/* MR-057: LearningViewerPage — collapse side panel below main content on mobile */
@media (max-width: 768px) {
  .vlp-layout {
    grid-template-columns: 1fr;
  }
  /* MR-093: stack order per learner-viewer-scene-panel-architecture §6.
     Desktop DOM source: Video, Takeaway (left col) | Status, Scene, Quiz (right col).
     Grid collapse to 1fr retains source order, giving Video → Takeaway →
     Status → Scene → Quiz which VIOLATES arch §6 (Scene must precede Status).
     Reassert via `order`. `.vlp-right` also switched to flex-column so `order`
     takes effect on its children. Merged with MR-057 border/padding rule. */
  .vlp-left {
    order: 0;
  }
  .vlp-right {
    border-top: 1px solid var(--surface-border, rgba(255,255,255,0.1));
    padding-top: 12px;
    order: 1;
    display: flex;
    flex-direction: column;
  }
  /* VLP-SCENE Phase 1 — tighter scene panel bounds on mobile so quiz remains
     reachable without excessive scrolling once the video ends.
     MR-100: cap max-height to 40vh in landscape orientation where 320px would
     dominate the viewport height. `min()` picks whichever is smaller. */
  .vlp-scene-panel {
    max-height: min(320px, 40vh);
    min-height: 160px;
  }
  .vlp-right #vlpSceneText,
  .vlp-right .vlp-scene-panel {
    order: 0;
  }
  .vlp-right .vlp-status-card {
    order: 1;
  }
  .vlp-right #vlpQuizPanel,
  .vlp-right .vlp-quiz-panel,
  .vlp-right #vlpAckPanel,
  .vlp-right .vlp-ack-panel {
    order: 2;
  }
  /* MR-099: Indic scripts (Devanagari/Tamil/Bengali/etc.) require larger body
     font sizes on mobile because matras/subscript marks collapse into adjacent
     lines below 15px. Bump the read-along body to 15px on narrow viewports. */
  .vlp-scene-item {
    font-size: 15px;
    line-height: 1.6;
  }
  /* MR-104: belt-and-suspenders — force break for long unbroken tokens (URLs,
     code, hashes) that would otherwise force horizontal overflow at 360px. */
  .vlp-scene-item__narration {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* MR-058: LearningPathBuilderPage — collapse 3-panel builder to single column on mobile */
@media (max-width: 768px) {
  #lpb-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  #lpb-body {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Sprint LEARNER-MOBILE-1 Mobile Responsiveness Fixes ────────────────────
   MR-072: vlp-topbar overflows on mobile — back button + title + right badges
           do not fit in one row at 375px with 24px side padding and 16px gap.
           The right badges (overdue/deadline) overflow off screen to the right.
   MR-073: vlp-completed-banner is a flex row with no column collapse at mobile.
           The completion text + icon stay horizontal but at very narrow widths
           the text gets truncated. Also vlp-cert-btn (Download Certificate) in
           the status card needs full width on mobile for touch accessibility.
   MR-074: vlp-viewer-controls bar contains one or two vlp-variant-selector-wrap
           elements each with min-inline-size:160px select (from components.css).
           Two selectors side-by-side at 375px = 320px minimum just for selects
           + 2×16px padding + gap = overflows. Needs flex-wrap at mobile.
   MR-075: vlp-main padding: 24px eats 48px of a 375px viewport — fine. But at
           375px vlp-topbar still runs .vlp-topbar-right inline with centre text.
           Fix: at ≤768px collapse topbar to two rows (back btn row + title row).
   MR-076: vlp-submit-action (quiz Submit button) is right-justified with no
           min-height/min-width enforcement at mobile. The button may be as narrow
           as the text width (~110px), which passes 44px height but misses
           left-side accessibility (needs to be full-width or at least 44px tall).
   MR-077: vlp-quiz-actions and vlp-ack-panel actions — submit and navigation
           buttons (Next / Previous / Acknowledge) are right-justified flex row
           with no mobile stack. On 375px two buttons side-by-side can be narrow.
   MR-078: lms-count-bar chips use min-width:88px; at 375px with 48px wrapper
           padding all four chips cannot fit one row (352px + 36px gaps > 327px).
           flex-wrap:wrap is already present so they wrap, but the chips are still
           too wide per row at the narrowest mobile. Reduce min-width at ≤375px.
   ─────────────────────────────────────────────────────────────────────────── */

/* MR-072 / MR-075: LearningViewerPage topbar — two-row layout on mobile */
@media (max-width: 768px) {
  .vlp-topbar {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 6px;
  }
  .vlp-back-btn {
    /* Keep back button on its own leading row chunk; ensure 44×44 tap area */
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .vlp-topbar-centre {
    /* Title row: take remaining space after back button; wraps below on very narrow screens */
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .vlp-topbar-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .vlp-topbar-right {
    /* Push deadline/overdue chips to their own row — they cannot squish the title */
    width: 100%;
    order: 3;
    gap: 6px;
    flex-wrap: wrap;
  }
  /* Hide deadline chip on smallest mobile to prevent overflow; overdue badge is retained */
  .vlp-deadline-chip {
    display: none;
  }
  /* Main content area — reduce horizontal padding so content has more width */
  .vlp-main {
    padding: 12px;
  }
}

/* MR-073: vlp-completed-banner — ensure it wraps on very narrow viewports */
@media (max-width: 768px) {
  .vlp-completed-banner {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Certificate button in the status card: full-width touch target on mobile */
  .vlp-cert-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  /* Status card text nodes: prevent overflow of long module titles or cert refs */
  .vlp-status-card {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* MR-074: vlp-viewer-controls — wrap selectors to column on mobile */
@media (max-width: 768px) {
  .vlp-viewer-controls {
    flex-direction: column;
    overflow: visible;
  }
  .vlp-viewer-controls .vlp-variant-selector-wrap {
    border-inline-end: none;
    border-block-end: 1px solid var(--surface-border, rgba(255,255,255,0.1));
    width: 100%;
  }
  .vlp-viewer-controls .vlp-variant-selector-wrap:last-child {
    border-block-end: none;
  }
}

/* MR-076 / MR-077: quiz and ack submit buttons — full-width on mobile */
@media (max-width: 768px) {
  .vlp-quiz-actions {
    flex-direction: column;
    gap: 8px;
  }
  .vlp-submit-action,
  .vlp-submit-action--full {
    width: 100%;
    justify-content: center;
    display: flex;
    min-height: 44px;
    align-items: center;
  }
  .vlp-ack-panel .vlp-submit-action--full {
    width: 100%;
    min-height: 44px;
  }
  /* Quiz option labels: ensure touch target height and text wrapping */
  .vlp-option-label {
    min-height: 44px;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* Key takeaway / snippet: ensure text wraps */
  .vlp-takeaway-text,
  .vlp-summary-list li,
  .vlp-quiz-question {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* MR-078: My Learning count chips — reduce min-width at narrowest mobile so all
   four chips fit two-per-row at 375px (327px content width ÷ 2 − 6px gap = ~160px) */
@media (max-width: 375px) {
  .lms-count-chip {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
    padding: 10px 8px;
  }
  .lms-inbox-wrap {
    padding: 16px 12px 48px;
  }
}

/* ── Sprint LEARNER-MOBILE-2 Mobile Responsiveness Fixes ────────────────────
   MR-080: vlp-ai-badge ("Vakio AI") clips inside .vlp-topbar-centre at 375px.
           The centre flex region has overflow:hidden so the badge — which has
           white-space:nowrap and no flex-shrink — gets clipped when the module
           title occupies most of the available row width. The badge is purely
           decorative (title already names the module). Hide on mobile.
   MR-081: Language fallback banner (.adm-alert .adm-alert-warn) is injected
           dynamically with inline style "display:flex; … justify-content:
           space-between". The text <span> child has no overflow-wrap, so long
           sentences like "Showing content in English — English version is being
           prepared." are truncated at 375px. Fix via .adm-alert span rule.
   MR-082: Horizontal scrollbar visible in .vlp-main content area at 375px.
           The .vlp-layout collapses to 1fr (MR-057) but the viewer container
           (.vlp-wrap, .mlp-overlay-inner) has no overflow-x:hidden guard.
           Add overflow-x:hidden to .vlp-wrap and the overlay inner to suppress
           content that inadvertently exceeds the viewport width.
   MR-083: .lms-card-cta ("Certificate" button) in MyLearningPage module cards
           is display:flex; justify-content:flex-end. At 375px the button sits
           flush-right and may be clipped if its sibling elements push it out.
           Make the CTA full-width on mobile so the button is always reachable.
   MR-084: .lms-progress-pct (percentage text "10%") in MyLearningPage module
           cards can be clipped when the card body overflows. The progress row
           uses flex:1 for the bar and min-width:32px for the pct — ensure pct
           has flex-shrink:0 so it is never squeezed off the visible area.
   MR-085: RepositoryPage KB card action buttons ("Upload Document", "Move to
           KB") sit in a flex row with inline flex-shrink:0 inside .repo-kb-
           header. At 375px the two buttons (≈220px combined) plus the KB name
           column and chevron exceed the viewport. Fix via JS class .repo-kb-
           actions + CSS flex-wrap:wrap + full-width buttons on mobile.
   ─────────────────────────────────────────────────────────────────────────── */

/* MR-080: hide decorative "Vakio AI" badge in topbar at mobile widths */
@media (max-width: 768px) {
  .vlp-ai-badge {
    display: none;
  }
}

/* MR-081: language fallback banner text — allow wrapping, prevent truncation.
   Targets both .adm-alert-warn and .alert-info variants injected by the viewer. */
@media (max-width: 768px) {
  .vlp-left .adm-alert,
  .vlp-left .alert {
    overflow-wrap: break-word;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
  }
  .vlp-left .adm-alert > span,
  .vlp-left .alert > span {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    flex: 1;
    min-width: 0;
  }
}

/* MR-082: suppress horizontal overflow in the learning viewer container */
@media (max-width: 768px) {
  .vlp-wrap {
    overflow-x: hidden;
  }
  .mlp-overlay-inner {
    overflow-x: hidden;
  }
}

/* MR-083: MyLearningPage module card CTA — full-width on mobile so Certificate
   button is never clipped at the right edge */
@media (max-width: 768px) {
  .lms-card-cta {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .lms-card-cta .lms-cert-btn,
  .lms-card-cta .lms-play-btn,
  .lms-card-cta .lms-locked-label {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* MR-084: progress percentage in module cards — never allow it to be clipped */
@media (max-width: 768px) {
  .lms-progress-pct {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .lms-progress-row {
    overflow: visible;
  }
}

/* MR-085: RepositoryPage KB card action buttons — wrap to next line on mobile.
   The JS adds class .repo-kb-actions to the actions container div. */
@media (max-width: 768px) {
  .repo-kb-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }
  .repo-kb-actions {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: unset !important;
    padding-left: 20px; /* align under kb-name, past the chevron */
  }
  .repo-kb-actions .adm-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    text-align: center;
    min-height: 44px;
    white-space: normal;
  }
}

/* ── Sprint LEARNER-MOBILE-3 Mobile Responsiveness Fixes ────────────────────
   MR-089: .lms-lp-card-header keeps flex-direction:row at mobile — the
           .lms-lp-card-actions side has flex-shrink:0 so it cannot compress.
           Combined with overflow:hidden on .lms-lp-card, the chevron toggle
           button is clipped at the right edge, appearing as a partial "▸"
           symbol. User reported this on the "Onboarding Awareness – New Joiner"
           assignment card at 375px. Fix: switch header to flex-direction:column
           so info and actions each occupy a full-width row.
           (Existing 768px rule patched in-place at line 3441.)

   MR-090: .lms-doc-card__header has no flex-wrap:wrap in the base rule. The
           actions side (toggle + open-doc btn) overflows the card right edge at
           mobile because the header cannot wrap and flex-shrink:0 on actions
           prevents compression. Fix: switch header to flex-direction:column on
           mobile.
           (Patched in components.css @media (max-width:768px) block at line 6543.)

   MR-091: .lms-lp-cert-action-btn missed in the original MR-5 tap-target fix.
           The button has padding:7px 13px producing ~30px effective height —
           below the WCAG 2.5.5 44px minimum. Fix: add min-height:44px for mobile.
           (Patched into the MR-5 block in learning-admin.css.)

   MR-092: .lms-doc-card__toggle-btn has padding:4px 8px; font-size:16px →
           computed height ~24px, well below 44px minimum. Fix: enforce
           44×44 minimum via min-height/min-width on mobile.
           (Patched in components.css @media (max-width:768px) block at line 6543.)
   ─────────────────────────────────────────────────────────────────────────── */
/* (All four fixes are applied in-place at their respective existing @media blocks
   above. No additional rules are needed here — this comment block is documentation
   only to keep the sprint history consistent with prior sprints.) */

/* ── Light-theme overrides: Video Learning Player (VLP) ─────────────────── */
[data-theme="light"] .vlp-topbar {
    background: var(--surface-card, #FFFFFF);
    border-bottom-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .vlp-back-btn {
    color: var(--text-secondary, #374151);
    border-color: rgba(0,0,0,0.18);
}
[data-theme="light"] .vlp-back-btn:hover {
    color: var(--color-teal);
    border-color: var(--color-teal);
}
[data-theme="light"] .vlp-topbar-title {
    color: var(--text-primary, #111827);
}

/* Control buttons and time labels sit on .vlp-controls which always has a dark
   gradient overlay (rgba(10,8,30,0.95)) regardless of theme — so these must
   always render as light text. */
.vlp-ctrl-btn {
    color: rgba(255,255,255,0.9);
}
.vlp-ctrl-btn:hover {
    color: var(--color-teal);
}
.vlp-time,
.vlp-watch-mini-label,
.vlp-watch-mini-pct {
    color: rgba(255,255,255,0.75);
}

/* ── Sprint POSH-COMPLIANCE-AUDIT-2026-08-21 Mobile Responsiveness Fixes ─────
   MR-173: .vam-input/.vam-textarea/.vam-select base font-size is .875rem (~14px).
           iOS Safari zooms in on any input/select with font-size < 16px on focus,
           which shifts layout and disorients the user. Fix: override to 16px at
           mobile. Desktop size unchanged (the override only applies ≤768px).
   MR-174: .lms-btn-ghost has padding:6px 14px + var(--text-sm) font — effective
           height ~34px, below the 44px WCAG 2.5.5 minimum. Fix: add min-height:44px
           at ≤768px so pagination buttons meet the tap-target requirement.
   MR-175: .vlp-ctrl-btn has padding:2px 4px — effective height ~24px. The player
           controls (play/pause/seek) are interactive buttons at the bottom of the
           video player and must meet the 44px minimum. Fix: min 44×44 at ≤768px.
   MR-176: .adm-input/.adm-select/.adm-textarea (SCORM section, also used by
           RepositoryPage modals) have font-size:13px — triggers iOS auto-zoom.
           Fix: override to 16px at ≤768px.
   MR-177: .adm-modal-close has padding:4px 8px + font-size:18px — effective
           height ~26px. Close button must be ≥44px on touch devices.
           Fix: min-height:44px + min-width:44px at ≤768px.
   MR-178: .adm-btn base has padding:8px 16px + font-size:13px — effective height
           ~34px. Fix: add min-height:44px at ≤768px.
   MR-179: .adm-btn--sm has padding:5px 12px + font-size:.78rem — effective height
           ~24px. Fix: min-height:44px at ≤768px (EscalationsPage action buttons).
   MR-180: SUPERSEDED — .acp-cert-table is already inside .adm-table-wrap which
           has overflow-x:auto (auditor.css:76). No fix required. Marked NO-FIX.
   MR-181: .lpb-stage-drag and .lpb-topic-drag-handle have padding:2px 4-5px —
           effective height ~22px. Drag handles on mobile still need ≥44px hit area
           for reliable touch activation. Fix: min 44×44 at ≤768px.
   MR-182: .scorm-instr-tab has padding:8px 14px + font-size:.8rem — effective
           height ~32px. Tab buttons must meet 44px minimum. Fix: min-height:44px.
   MR-183: .lpd-lang-select has font-size:.72rem (~11.5px) — far below the 16px
           iOS zoom threshold on a <select>. Fix: override to 16px at ≤768px.
   MR-184: .lms-lp-chevron-btn has padding:4px 6px — effective height ~24px.
           Fix: min-height:44px + min-width:44px at ≤768px.
   MR-185: .lms-lp-name-btn has padding:0 — effective height ~15px (line-height
           only). The LP name button is the primary expand/collapse target in the
           LP group header. Fix: add min-height:44px + padding:10px 0 at ≤768px so
           the entire header row area is tappable.
   MR-186: TenantTopicsPage.js inline <select style="font-size:11px"> elements in
           the approval history filter bar. Inline styles cannot be overridden by
           CSS alone; the fix is applied in TenantTopicsPage.js (_renderApprovalLog).
           The .ttp-filter-select class is added and the inline font-size removed.
   ─────────────────────────────────────────────────────────────────────────── */

/* MR-173: vam-input/vam-textarea/vam-select — iOS auto-zoom prevention */
@media (max-width: 768px) {
  .vam-input,
  .vam-textarea,
  .vam-select {
    font-size: 16px;
  }
}

/* MR-174: lms-btn-ghost pagination buttons — 44px minimum tap target */
@media (max-width: 768px) {
  .lms-btn-ghost {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* MR-175: vlp-ctrl-btn player controls — 44×44 minimum tap target */
@media (max-width: 768px) {
  .vlp-ctrl-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
  }
}

/* MR-176: adm-input/adm-select/adm-textarea — iOS auto-zoom prevention */
@media (max-width: 768px) {
  .adm-input,
  .adm-select,
  .adm-textarea {
    font-size: 16px;
  }
}

/* MR-177: adm-modal-close — 44×44 minimum tap target */
@media (max-width: 768px) {
  .adm-modal-close {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* MR-178: adm-btn base — 44px minimum tap target */
@media (max-width: 768px) {
  .adm-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* MR-179: adm-btn--sm — 44px minimum tap target (overrides MR-178 for sm variant) */
@media (max-width: 768px) {
  .adm-btn--sm {
    min-height: 44px;
  }
}

/* MR-181: lpb-stage-drag and lpb-topic-drag-handle — 44×44 minimum touch target */
@media (max-width: 768px) {
  .lpb-stage-drag,
  .lpb-topic-drag-handle {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }
}

/* MR-182: scorm-instr-tab — 44px minimum tap target */
@media (max-width: 768px) {
  .scorm-instr-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* MR-183: lpd-lang-select — iOS auto-zoom prevention */
@media (max-width: 768px) {
  .lpd-lang-select {
    font-size: 16px;
    min-height: 44px;
  }
}

/* MR-184: lms-lp-chevron-btn — 44×44 minimum tap target */
@media (max-width: 768px) {
  .lms-lp-chevron-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* MR-185: lms-lp-name-btn — minimum tappable height (LP group expand/collapse) */
@media (max-width: 768px) {
  .lms-lp-name-btn {
    min-height: 44px;
    padding: 10px 0;
    display: flex;
    align-items: center;
  }
}

/* MR-186: ttp-filter-select — iOS auto-zoom prevention (class added in TenantTopicsPage.js) */
@media (max-width: 768px) {
  .ttp-filter-select {
    font-size: 16px;
    min-height: 44px;
  }
}
