/* M4 LMS — Frontend Styles
   Single file, no build step, < 10 KB.
   Uses a scoped .lms-* namespace to avoid theme conflicts. */

/* ─── Reset / base ──────────────────────────────────────────────────────── */
.lms-course, .lms-module, .lms-chapter-wrap {
  box-sizing: border-box;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: inherit;
}

/* ─── Badges ────────────────────────────────────────────────────────────── */
.lms-badge {
  display: inline-block;
  padding: .2em .55em;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-right: .4rem;
}
.lms-badge--lang  { background: #e8f0fe; color: #1a56db; }
.lms-badge--open  { background: #def7ec; color: #057a55; }

/* ─── Course header ─────────────────────────────────────────────────────── */
.lms-course__header { margin-bottom: 1.5rem; }
.lms-course__thumbnail img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 1rem; }
.lms-course__meta  { margin-bottom: .5rem; }
.lms-course__title { margin: 0 0 .5rem; }
.lms-course__description { margin-bottom: 1.5rem; }

/* ─── Module cards (course overview) ───────────────────────────────────── */
.lms-module-list__heading { font-size: 1.1rem; margin: 1.5rem 0 .75rem; border-bottom: 2px solid #e5e7eb; padding-bottom: .4rem; }
.lms-module-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: .5rem;
  background: #fafafa;
  transition: background .15s;
}
.lms-module-card:hover { background: #f0f4ff; }
.lms-module-card__info  { display: flex; flex-direction: column; gap: .15rem; }
.lms-module-card__title { font-weight: 600; color: inherit; text-decoration: none; }
.lms-module-card__title:hover { text-decoration: underline; }
.lms-module-card__count { font-size: .83rem; color: #6b7280; }
.lms-module-card__link  { font-size: 1.2rem; color: #4b5563; text-decoration: none; padding: .25rem .5rem; }

/* ─── Module view / chapter list ───────────────────────────────────────── */
.lms-module__header { margin-bottom: 1.25rem; }
.lms-module__number { color: #6b7280; margin-right: .25rem; }
.lms-chapter-list__heading { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.lms-chapter-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  margin-bottom: .35rem;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  transition: background .15s;
}
.lms-chapter-row:hover      { background: #f0f4ff; }
.lms-chapter-row--done      { background: #f0fdf4; border-color: #bbf7d0; }
.lms-chapter-row__indicator { font-size: 1rem; width: 1.2rem; text-align: center; flex-shrink: 0; color: #057a55; }
.lms-chapter-row__number    { color: #6b7280; font-size: .9rem; }
.lms-chapter-row__title     { flex: 1; font-weight: 500; }
.lms-chapter-row__badge     { font-size: .72rem; background: #def7ec; color: #057a55; padding: .1em .45em; border-radius: 3px; font-weight: 600; margin-left: auto; }

/* ─── Chapter layout (2-column grid) ───────────────────────────────────── */
.lms-chapter-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
.lms-chapter-content { min-width: 0; }
.lms-chapter-sidebar { position: sticky; top: 1.5rem; }
.lms-chapter__title  { margin-bottom: 1.25rem; }

@media (max-width: 768px) {
  .lms-chapter-wrap { grid-template-columns: 1fr; }
  .lms-chapter-sidebar { order: -1; position: static; }
}

/* ─── Content blocks ────────────────────────────────────────────────────── */
.lms-block { margin-bottom: 1.75rem; }

/* Video — responsive 16:9 */
.lms-video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 6px; background: #000; }
.lms-video-wrapper iframe,
.lms-video-wrapper embed,
.lms-video-wrapper object { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.lms-video-caption { margin-top: .5rem; font-size: .85rem; color: #6b7280; text-align: center; }

/* Image */
.lms-figure { margin: 0; }
.lms-figure__img    { width: 100%; height: auto; border-radius: 6px; display: block; }
.lms-figure__caption { margin-top: .4rem; font-size: .85rem; color: #6b7280; text-align: center; }

/* Callout */
.lms-callout {
  display: flex;
  gap: .9rem;
  padding: 1rem 1.1rem;
  border-radius: 6px;
  border-left: 4px solid currentColor;
}
.lms-callout--info    { background: #eff6ff; color: #1d4ed8; }
.lms-callout--warning { background: #fffbeb; color: #b45309; }
.lms-callout--tip     { background: #f0fdf4; color: #166534; }
.lms-callout__icon    { font-size: 1.25rem; flex-shrink: 0; }
.lms-callout__body    { flex: 1; color: inherit; }
.lms-callout__body p:last-child { margin-bottom: 0; }

/* Download button */
.lms-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.1rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: background .15s;
}
.lms-download-btn:hover    { background: #e5e7eb; }
.lms-download-btn__icon    { font-size: 1.1rem; }
.lms-download-btn__size    { margin-left: .3rem; font-size: .8rem; color: #6b7280; }

/* Code block */
.lms-code-header { display: flex; align-items: center; background: #1e1e1e; border-radius: 6px 6px 0 0; padding: .35rem .8rem; }
.lms-code-lang   { font-size: .72rem; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .06em; }
.lms-code-pre    { margin: 0; background: #1e1e1e; border-radius: 0 0 6px 6px; overflow-x: auto; padding: 1rem; }
.lms-code        { color: #d4d4d4; font-family: 'SFMono-Regular', Consolas, monospace; font-size: .85rem; line-height: 1.6; white-space: pre; }

/* ─── Breadcrumbs ───────────────────────────────────────────────────────── */
.lms-breadcrumbs { font-size: .82rem; color: #6b7280; margin-bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; }
.lms-breadcrumbs__link    { color: #4b6bfb; text-decoration: none; }
.lms-breadcrumbs__link:hover { text-decoration: underline; }
.lms-breadcrumbs__sep     { color: #9ca3af; margin: 0 .15rem; }
.lms-breadcrumbs__current { color: #374151; font-weight: 500; }

/* ─── Prev / Next navigation ────────────────────────────────────────────── */
.lms-chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}
.lms-chapter-nav__prev,
.lms-chapter-nav__next { flex: 1; }
.lms-chapter-nav__next { text-align: right; }
.lms-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  font-size: .9rem;
  max-width: 100%;
  transition: background .15s, border-color .15s;
}
.lms-nav-btn:hover { background: #f0f4ff; border-color: #4b6bfb; }
.lms-nav-btn__label { display: flex; flex-direction: column; overflow: hidden; }
.lms-nav-btn__hint  { font-size: .72rem; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; }
.lms-nav-btn__title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Mark as complete button ───────────────────────────────────────────── */
.lms-complete-wrap { margin: 1.5rem 0; }
.lms-btn-complete {
  padding: .65rem 1.4rem;
  background: #4b6bfb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.lms-btn-complete:hover:not(:disabled) { background: #3451d1; }
.lms-btn-complete--done { background: #057a55; cursor: default; }
.lms-btn-complete:disabled { opacity: .8; }

/* ─── Sidebar outline ───────────────────────────────────────────────────── */
.lms-outline {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}
.lms-outline__course-link   { font-size: .82rem; color: #4b6bfb; text-decoration: none; display: block; margin-bottom: .75rem; }
.lms-outline__course-link:hover { text-decoration: underline; }
.lms-outline__module-title  { font-size: .9rem; font-weight: 700; margin: 0 0 .75rem; color: #374151; }
.lms-outline__list          { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.lms-outline__item          {}
.lms-outline__link {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .45rem .5rem;
  border-radius: 5px;
  text-decoration: none;
  color: #374151;
  font-size: .86rem;
  transition: background .12s;
}
.lms-outline__link:hover          { background: #f0f4ff; }
.lms-outline__item--active .lms-outline__link { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.lms-outline__item--done .lms-outline__link   { color: #6b7280; }
.lms-outline__indicator     { flex-shrink: 0; font-size: .85rem; width: 1rem; color: #057a55; }
.lms-outline__chapter-title { flex: 1; line-height: 1.35; }

/* ─── Progress bar ──────────────────────────────────────────────────────── */
.lms-progress { margin-bottom: 1.5rem; }
.lms-progress__bar  { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin-bottom: .4rem; }
.lms-progress__fill { height: 100%; background: #4b6bfb; border-radius: 99px; transition: width .4s ease; }
.lms-progress__label { font-size: .82rem; color: #6b7280; }

/* ─── Access denied ─────────────────────────────────────────────────────── */
.lms-access-denied { display: flex; justify-content: center; align-items: center; min-height: 40vh; padding: 2rem 1rem; }
.lms-access-denied__card {
  text-align: center;
  max-width: 440px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.lms-access-denied__icon    { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.lms-access-denied__title   { margin: 0 0 .75rem; font-size: 1.3rem; }
.lms-access-denied__message { color: #6b7280; margin-bottom: 1.25rem; }
.lms-access-denied__hint    { color: #6b7280; font-size: .9rem; margin-top: .75rem; }

/* ─── Chapter checkpoint ────────────────────────────────────────────────── */
.lms-checkpoint {
  margin: 2rem 0;
  border: 2px solid #e0e7ff;
  border-radius: 8px;
  background: #f5f7ff;
  overflow: hidden;
}
.lms-checkpoint--submitted {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.lms-checkpoint__inner  { padding: 1.25rem 1.4rem; }
.lms-checkpoint__heading {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .9rem;
  color: #3730a3;
}
.lms-checkpoint--submitted .lms-checkpoint__heading { color: #166534; }
.lms-checkpoint__icon   { font-size: 1.1rem; flex-shrink: 0; }
.lms-checkpoint__question { margin-bottom: 1rem; }
.lms-checkpoint__question p:last-child { margin-bottom: 0; }

/* Form */
.lms-checkpoint__form   { margin-top: .75rem; }
.lms-checkpoint__textarea {
  display: block;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.55;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s;
}
.lms-checkpoint__textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.lms-checkpoint__file-label {
  display: block;
  font-size: .88rem;
  margin-bottom: .5rem;
  color: #374151;
}
.lms-checkpoint__file-input { margin-top: .35rem; display: block; }
.lms-checkpoint__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
}
.lms-checkpoint__error {
  color: #b91c1c;
  font-size: .85rem;
}

/* Explanation */
.lms-checkpoint__explanation { margin-top: .9rem; }
.lms-checkpoint__explanation--hidden { display: none; }
.lms-checkpoint__submitted-note {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  padding: .3em .7em;
  border-radius: 4px;
  margin-bottom: .75rem;
}
.lms-checkpoint__explanation p:last-child { margin-bottom: 0; }

/* Hint below Mark-as-Complete */
.lms-complete-wrap__hint {
  font-size: .82rem;
  color: #6b7280;
  margin: .4rem 0 0;
}

/* ─── Reports widget ────────────────────────────────────────────────────── */
.lms-report-widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  font-size: .95rem;
  max-width: 1080px;
  margin: 0 auto 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Header */
.lms-report-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.lms-report-widget__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.lms-report-widget__role-badge {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25em .7em;
  border-radius: 99px;
}
.lms-report-widget__role-badge--admin        { background: #ede9fe; color: #6d28d9; }
.lms-report-widget__role-badge--coach        { background: #dbeafe; color: #1d4ed8; }
.lms-report-widget__role-badge--team-leader  { background: #ccfbf1; color: #0f766e; }

/* Tabs */
.lms-report-widget__tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0 1.4rem;
  gap: .25rem;
}
.lms-report-widget__tab {
  padding: .7rem 1.1rem;
  font-size: .88rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.lms-report-widget__tab:hover    { color: #374151; }
.lms-report-widget__tab.is-active { color: #4b6bfb; border-bottom-color: #4b6bfb; }

/* Panels */
.lms-report-widget__panel        { display: none; padding: 1.25rem 1.4rem; }
.lms-report-widget__panel.is-active { display: block; }

/* Filter bar */
.lms-report-widget__filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  margin-bottom: 1.25rem;
}
.lms-report-widget__filter-label { font-weight: 600; font-size: .88rem; color: #374151; white-space: nowrap; }
.lms-report-widget__select {
  padding: .45rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: .88rem;
  background: #fff;
  color: #374151;
  min-width: 200px;
  cursor: pointer;
  transition: border-color .15s;
}
.lms-report-widget__select:focus { outline: none; border-color: #4b6bfb; box-shadow: 0 0 0 3px rgba(75,107,251,.15); }
.lms-report-widget__team-name { font-weight: 600; font-size: .95rem; color: #374151; }

/* Summary stat cards */
.lms-report-widget__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.lms-report-widget__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  padding: .75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  flex: 1;
}
.lms-report-widget__stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.lms-report-widget__stat-label { font-size: .72rem; color: #6b7280; margin-top: .3rem; text-align: center; }
.lms-report-widget__stat--not-started  { background: #f3f4f6; }
.lms-report-widget__stat--not-started .lms-report-widget__stat-value { color: #6b7280; }
.lms-report-widget__stat--in-progress  { background: #eff6ff; border-color: #bfdbfe; }
.lms-report-widget__stat--in-progress .lms-report-widget__stat-value { color: #1d4ed8; }
.lms-report-widget__stat--completed    { background: #f0fdf4; border-color: #bbf7d0; }
.lms-report-widget__stat--completed .lms-report-widget__stat-value   { color: #166534; }
.lms-report-widget__stat--avg         { background: #faf5ff; border-color: #e9d5ff; }
.lms-report-widget__stat--avg .lms-report-widget__stat-value         { color: #6d28d9; }

/* Table */
.lms-report-widget__table-scroll { overflow-x: auto; }
.lms-report-widget__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.lms-report-widget__table thead th {
  text-align: left;
  padding: .6rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.lms-report-widget__table tbody tr { border-bottom: 1px solid #f3f4f6; transition: background .1s; }
.lms-report-widget__table tbody tr:hover { background: #fafafa; }
.lms-report-widget__table tbody tr:last-child { border-bottom: none; }
.lms-report-widget__table td { padding: .7rem .75rem; vertical-align: middle; }

/* Row: user cell */
.lms-rw-row__user   { display: flex; align-items: center; gap: .6rem; }
.lms-rw-row__avatar { border-radius: 50%; flex-shrink: 0; }
.lms-rw-row__info   { display: flex; flex-direction: column; gap: .05rem; }
.lms-rw-row__name   { font-weight: 600; color: #111827; }
.lms-rw-row__email  { font-size: .78rem; color: #9ca3af; }

/* Row: position */
.lms-rw-position      { font-size: .82rem; font-weight: 600; color: #374151; white-space: nowrap; }
.lms-rw-position--none { color: #d1d5db; }

/* Row: progress bar */
.lms-rw-bar         { display: flex; align-items: center; gap: .5rem; min-width: 120px; }
.lms-rw-bar__track  { flex: 1; height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.lms-rw-bar__fill   { height: 100%; border-radius: 99px; transition: width .3s ease; }
.lms-rw-bar__fill--not_started { background: #d1d5db; }
.lms-rw-bar__fill--in_progress { background: #4b6bfb; }
.lms-rw-bar__fill--completed   { background: #16a34a; }
.lms-rw-bar__pct    { font-size: .78rem; color: #6b7280; white-space: nowrap; min-width: 2.5rem; text-align: right; }

/* Row: status badge */
.lms-rw-status             { display: inline-block; padding: .2em .6em; border-radius: 3px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.lms-rw-status--not_started { background: #f3f4f6; color: #6b7280; }
.lms-rw-status--in_progress { background: #dbeafe; color: #1d4ed8; }
.lms-rw-status--completed   { background: #dcfce7; color: #166534; }

/* States */
.lms-report-widget__loading {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 2rem 1rem;
  color: #6b7280;
  font-size: .9rem;
}
.lms-report-widget__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #4b6bfb;
  border-radius: 50%;
  animation: lms-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes lms-spin { to { transform: rotate(360deg); } }

.lms-report-widget__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  text-align: center;
}
.lms-report-widget__empty-icon { font-size: 2rem; margin-bottom: .5rem; }
.lms-report-widget__empty p   { margin: 0; font-size: .9rem; }
.lms-report-widget__denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.lms-report-widget__denied-icon { font-size: 2rem; margin-bottom: .5rem; }

@media (max-width: 600px) {
  .lms-report-widget__filter   { flex-direction: column; align-items: flex-start; }
  .lms-report-widget__select   { width: 100%; min-width: 0; }
  .lms-report-widget__stats    { gap: .5rem; }
  .lms-report-widget__stat     { min-width: calc(50% - .25rem); }
  .lms-rw-row__email           { display: none; }
}

/* ─── Generic helpers ───────────────────────────────────────────────────── */
.lms-btn {
  display: inline-block;
  padding: .6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s;
}
.lms-btn--primary { background: #4b6bfb; color: #fff; }
.lms-btn--primary:hover { background: #3451d1; color: #fff; }
.lms-empty { color: #9ca3af; font-style: italic; }

/* ── Last active cell ───────────────────────────────────────────────────── */
.lms-rw-row__last-active { white-space: nowrap; }
.lms-rw-date {
  display: block;
  font-size: .78rem;
  color: #374151;
  margin-bottom: .15rem;
}

/* ── Idle / activity badges ─────────────────────────────────────────────── */
.lms-idle {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: .2rem;
}
.lms-idle--ok      { background: #d1fae5; color: #065f46; }
.lms-idle--warning { background: #fef3c7; color: #92400e; }
.lms-idle--danger  { background: #fee2e2; color: #991b1b; }
.lms-idle--unknown { background: #f3f4f6; color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════════════════════
   LEARNER DASHBOARD  [lms_my_courses]
   ═══════════════════════════════════════════════════════════════════════════ */

.lms-dashboard { padding: .5rem 0; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.lms-dashboard__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 16px;
  margin-bottom: 1.75rem;
  color: #fff;
}
.lms-dashboard__hero-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
  min-width: 0;
}

/* Avatar initials circle */
.lms-dashboard__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  letter-spacing: -.03em;
  border: 2px solid rgba(255,255,255,.2);
  user-select: none;
}

.lms-dashboard__greeting {
  margin: 0 0 .25rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.lms-dashboard__greeting-name { color: #93c5fd; }

.lms-dashboard__sub {
  margin: 0;
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .65rem;
}
.lms-dashboard__team-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .2em .7em;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
}
.lms-dashboard__sub-note       { color: rgba(255,255,255,.6); }
.lms-dashboard__sub-note--done { color: #86efac; }

/* Quick stats */
.lms-dashboard__stats {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}
.lms-dashboard__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: .7rem .9rem;
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
}
.lms-dashboard__stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.lms-dashboard__stat--pct .lms-dashboard__stat-value { color: #86efac; }
.lms-dashboard__stat-label {
  font-size: .68rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  margin-top: .3rem;
  text-align: center;
  white-space: nowrap;
}

/* ── Continue Learning spotlight ───────────────────────────────────────── */
.lms-dashboard__spotlight { margin-bottom: 2.25rem; }

.lms-dashboard__spotlight-label {
  margin: 0 0 .75rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.lms-dashboard__spotlight-label-icon { color: #3b82f6; font-size: .75em; }

.lms-spotlight-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 8px 28px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
  transition: box-shadow .2s;
}
.lms-spotlight-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.09), 0 16px 40px rgba(0,0,0,.07);
}

.lms-spotlight-card__cover-link { display: block; height: 100%; }
.lms-spotlight-card__cover {
  width: 100%;
  height: 100%;
  min-height: 230px;
  overflow: hidden;
  background: #e5e7eb;
}
.lms-spotlight-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.lms-spotlight-card:hover .lms-spotlight-card__img { transform: scale(1.03); }
.lms-spotlight-card__cover--gradient {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lms-spotlight-card__initial {
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255,255,255,.6);
  line-height: 1;
  user-select: none;
}

.lms-spotlight-card__body {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.lms-spotlight-card__title {
  margin: 0 0 .1rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}
.lms-spotlight-card__title a { color: inherit; text-decoration: none; }
.lms-spotlight-card__title a:hover { color: #2563eb; }
.lms-spotlight-card__position {
  margin: 0;
  font-size: .88rem;
  color: #6b7280;
}
.lms-spotlight-card__module-label { font-weight: 700; color: #374151; }
.lms-spotlight-card__progress-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .25rem 0 .05rem;
}
.lms-spotlight-card__bar {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.lms-spotlight-card__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 99px;
  transition: width .6s ease;
}
.lms-spotlight-card__pct {
  font-size: .82rem;
  font-weight: 700;
  color: #374151;
  min-width: 2.5rem;
  text-align: right;
}
.lms-spotlight-card__chapters-done {
  margin: 0;
  font-size: .8rem;
  color: #9ca3af;
}
.lms-spotlight-card__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding: .75rem 1.75rem;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
  align-self: flex-start;
}
.lms-spotlight-card__btn:hover  { background: #1d4ed8; color: #fff; }
.lms-spotlight-card__btn:active { transform: scale(.97); }

/* ── All-done celebration banner ───────────────────────────────────────── */
.lms-dashboard__all-done {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  margin-bottom: 2rem;
}
.lms-dashboard__all-done-icon       { font-size: 2rem; flex-shrink: 0; }
.lms-dashboard__all-done-title      { margin: 0 0 .2rem; font-weight: 700; color: #166534; }
.lms-dashboard__all-done-sub        { margin: 0; font-size: .85rem; color: #15803d; }

/* ── Section heading ───────────────────────────────────────────────────── */
.lms-dashboard__section { margin-top: .25rem; }
.lms-dashboard__section-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}
.lms-dashboard__section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  padding: 0 .4rem;
}

/* ── Course card grid ──────────────────────────────────────────────────── */
.lms-my-courses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Empty / login states */
.lms-my-courses__empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
}
.lms-my-courses__empty-icon { font-size: 2.5rem; display: block; margin-bottom: .75rem; }
.lms-my-courses__empty p    { margin: 0 0 1.25rem; font-size: .95rem; }

/* ── Card shell ────────────────────────────────────────────────────────── */
.lms-course-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  opacity: 0;
  animation: lms-card-in .45s ease forwards;
}
.lms-course-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1), 0 12px 32px rgba(0,0,0,.07);
  transform: translateY(-3px);
}

/* Card entrance animation */
@keyframes lms-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cover image / gradient ────────────────────────────────────────────── */
.lms-course-card__cover-link { display: block; position: relative; text-decoration: none; }
.lms-course-card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #e5e7eb;
}
.lms-course-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.lms-course-card:hover .lms-course-card__img { transform: scale(1.04); }

/* Gradient placeholder */
.lms-course-card__cover--gradient {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lms-course-card__initial {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,.75);
  line-height: 1;
  user-select: none;
}

/* Status badge overlay on cover */
.lms-course-card__badge {
  position: absolute;
  top: .65rem;
  right: .65rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  letter-spacing: .03em;
  backdrop-filter: blur(4px);
}
.lms-course-card__badge--completed {
  background: rgba(22,101,52,.88);
  color: #fff;
}
.lms-course-card__badge--progress {
  background: rgba(37,99,235,.88);
  color: #fff;
}

/* ── Card body ─────────────────────────────────────────────────────────── */
.lms-course-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .4rem;
}

.lms-course-card__title {
  margin: 0 0 .15rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}
.lms-course-card__title a {
  color: inherit;
  text-decoration: none;
}
.lms-course-card__title a:hover { color: #2563eb; }

.lms-course-card__meta {
  margin: 0;
  font-size: .78rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Progress bar */
.lms-course-card__progress-wrap {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: .35rem 0 .1rem;
}
.lms-course-card__bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.lms-course-card__fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}
.lms-course-card__fill--not_started { width: 0 !important; background: #e5e7eb; }
.lms-course-card__fill--in_progress  { background: #3b82f6; }
.lms-course-card__fill--completed    { background: #16a34a; }

.lms-course-card__pct {
  font-size: .75rem;
  font-weight: 700;
  color: #374151;
  min-width: 2.5rem;
  text-align: right;
}
.lms-course-card__chapters-done {
  margin: 0;
  font-size: .75rem;
  color: #9ca3af;
}

/* CTA button */
.lms-course-card__btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .1s;
  align-self: flex-start;
}
.lms-course-card__btn:active { transform: scale(.97); }
.lms-course-card__btn-icon   { font-size: .8em; }

.lms-course-card__btn--not_started {
  background: #2563eb;
  color: #fff;
}
.lms-course-card__btn--not_started:hover { background: #1d4ed8; color: #fff; }

.lms-course-card__btn--in_progress {
  background: #2563eb;
  color: #fff;
}
.lms-course-card__btn--in_progress:hover { background: #1d4ed8; color: #fff; }

.lms-course-card__btn--completed {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.lms-course-card__btn--completed:hover { background: #dcfce7; color: #15803d; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */

/* Tablet: spotlight stacks vertically */
@media (max-width: 820px) {
  .lms-spotlight-card {
    grid-template-columns: 1fr;
  }
  .lms-spotlight-card__cover {
    height: 200px;
    min-height: 0;
  }
  .lms-spotlight-card__body {
    padding: 1.5rem 1.75rem;
  }
  .lms-spotlight-card__title { font-size: 1.15rem; }
}

/* Phones */
@media (max-width: 600px) {
  .lms-dashboard__hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.1rem;
    gap: 1rem;
  }
  .lms-dashboard__hero-left { gap: .85rem; }
  .lms-dashboard__avatar    { width: 50px; height: 50px; font-size: 1.1rem; }
  .lms-dashboard__greeting  { font-size: 1.1rem; }
  .lms-dashboard__stats {
    width: 100%;
    gap: .5rem;
  }
  .lms-dashboard__stat { flex: 1; padding: .6rem .5rem; min-width: 0; }
  .lms-dashboard__stat-value { font-size: 1.3rem; }

  .lms-spotlight-card__cover  { height: 160px; }
  .lms-spotlight-card__body   { padding: 1.1rem 1.25rem 1.5rem; }
  .lms-spotlight-card__btn    { width: 100%; justify-content: center; padding: .7rem 1rem; }

  .lms-my-courses__grid       { grid-template-columns: 1fr; gap: 1rem; }
  .lms-course-card__cover     { aspect-ratio: 16 / 6; }
}

/* ── Module locked state ─────────────────────────────────────────────────── */

.lms-module-card--locked {
  opacity: .55;
  pointer-events: none;
  cursor: default;
  background: #f9fafb;
}
.lms-module-card--locked .lms-module-card__title--locked {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: .4em;
}
.lms-module-card__available-from {
  font-size: .82em;
  color: #9ca3af;
  font-style: italic;
}
.lms-module-card__link--locked {
  color: #d1d5db;
  font-size: 1.1rem;
}
.lms-lock-icon {
  font-size: .9em;
  opacity: .7;
}

/* Locked module full-page notice */
.lms-module--locked-page {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1rem;
}
.lms-back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: #2271b1;
  text-decoration: none;
  font-size: .95rem;
}
.lms-back-link:hover { text-decoration: underline; }
.lms-locked-notice {
  text-align: center;
  padding: 3rem 2rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.lms-locked-notice__icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}
.lms-locked-notice__title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 .75rem;
}
.lms-locked-notice__date {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}
