/* ============================================================
   BKRTC LMS + Online Examination Portal — Design System
   ------------------------------------------------------------
   Builds on top of the site's existing --navy/--saffron/--gray
   tokens (assets/css/style.css) so it stays visually part of the
   same portal, while giving the learning/exam areas their own
   identity:
     - LMS section reads in navy + saffron + gold (certificate feel)
     - Exam Portal section reads in teal (visually distinct "mode")
   Signature element: the "medallion" progress ring — a gold-rimmed
   circular badge that fills in as lessons/exams are completed,
   echoing BKRTC's own certificate & award visual language instead
   of a generic progress bar.
   ============================================================ */

:root {
  --lms-gold: #C9A227;
  --lms-gold-light: #FBF3DC;
  --lms-teal: #0F6B66;
  --lms-teal-light: #E3F3F2;
  --lms-navy: var(--navy, #1A2238);
  --lms-saffron: var(--saffron, #FF6B35);
  --lms-radius: 16px;
}

/* ---------------- Layout ---------------- */
.lms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
@media (max-width: 700px) {
  .lms-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------------- Course Card ---------------- */
.lms-card {
  background: #fff;
  border-radius: var(--lms-radius);
  overflow: hidden;
  border: 1px solid var(--gray-100, #EFF1F4);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(26,34,56,.06));
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.lms-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md, 0 8px 24px rgba(26,34,56,.1)); }

.lms-card-cover {
  height: 130px;
  background: linear-gradient(135deg, var(--lms-navy) 0%, #2b3660 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
}
.lms-card-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.lms-card-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,34,56,0) 30%, rgba(26,34,56,.65) 100%);
}
.lms-card-level {
  position: relative; z-index: 1;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.18); backdrop-filter: blur(2px);
  padding: 3px 9px; border-radius: 20px;
}
.lms-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.lms-card-title { font-size: 15.5px; font-weight: 700; color: var(--lms-navy); margin: 0 0 4px; line-height: 1.3; }
.lms-card-meta { font-size: 11.5px; color: var(--gray-600, #6B7280); margin-bottom: 10px; display:flex; gap:10px; flex-wrap:wrap; }
.lms-card-actions { margin-top: auto; display: flex; gap: 8px; }

.lms-status-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: capitalize; }
.lms-status-draft { background: var(--gray-100, #EFF1F4); color: var(--gray-600, #6B7280); }
.lms-status-pending_review { background: #FFF3D6; color: #8A6D00; }
.lms-status-published { background: #E3F6ED; color: #157347; }
.lms-status-rejected { background: #FDE7E5; color: #B3261E; }

/* ---------------- Medallion progress ring (signature element) ---------------- */
.lms-medallion { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.lms-medallion svg { transform: rotate(-90deg); }
.lms-medallion circle.track { fill: none; stroke: var(--gray-100, #EFF1F4); stroke-width: 5; }
.lms-medallion circle.fill { fill: none; stroke: var(--lms-gold); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.lms-medallion .lms-medallion-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--lms-navy); }

/* ---------------- Exam Portal accent (teal "mode") ---------------- */
.oep-card-cover { background: linear-gradient(135deg, var(--lms-teal) 0%, #14847d 100%); }
.oep-badge { background: var(--lms-teal-light); color: var(--lms-teal); font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.oep-btn { background: var(--lms-teal); color: #fff; border: none; }
.oep-btn:hover { background: #0c5652; }

/* ---------------- Empty state ---------------- */
.lms-empty { text-align: center; padding: 60px 20px; color: var(--gray-600, #6B7280); }
.lms-empty .lms-empty-icon { font-size: 40px; margin-bottom: 10px; opacity: .5; }

/* ---------------- Module/Lesson builder ---------------- */
.lms-module { background: #fff; border: 1px solid var(--gray-100, #EFF1F4); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.lms-module-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--gray-50, #F8F9FA); gap: 10px; flex-wrap: wrap; }
.lms-module-title { font-weight: 700; color: var(--lms-navy); font-size: 14px; }
.lms-lesson-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--gray-100, #EFF1F4); font-size: 13px; }
.lms-lesson-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--lms-gold-light); flex-shrink: 0; font-size: 14px; }
.lms-lesson-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lms-order-btns { display: flex; flex-direction: column; gap: 1px; }
.lms-order-btns button { border: none; background: var(--gray-100, #EFF1F4); width: 20px; height: 16px; font-size: 9px; cursor: pointer; border-radius: 3px; color: var(--gray-600); }
.lms-order-btns button:hover { background: var(--lms-saffron); color: #fff; }

@media (max-width: 700px) {
  .lms-lesson-row { flex-wrap: wrap; }
  .lms-module-head { flex-direction: column; align-items: flex-start; }
}
