/* ============================================================
   LMS Additional Styles
   ============================================================ */

/* ── Header ─────────────────────────────────────────────────── */
.lms-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.lms-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lms-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.lms-nav a {
  color: #475569;
  text-decoration: none;
  padding: .4rem .85rem;
  border-radius: .4rem;
  font-size: .9rem;
  transition: background .15s;
}
.lms-nav a:hover { background: #f1f5f9; color: #1e293b; }
.btn-nav {
  background: #2563eb;
  color: #fff !important;
  padding: .4rem 1rem !important;
  border-radius: .4rem;
}
.btn-nav:hover { background: #1d4ed8 !important; }
.btn-nav-logout { color: #dc2626 !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ── Hero ────────────────────────────────────────────────────── */
.lms-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}
.lms-hero-content { max-width: 700px; }
.lms-hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.lms-hero-content p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: 2rem;
}
.highlight { color: #fbbf24; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fbbf24;
}
.stat span { font-size: .85rem; opacity: .8; }

/* ── Course Grid ─────────────────────────────────────────────── */
.section-courses { padding: 4rem 0; }
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.course-card {
  background: #fff;
  border-radius: .875rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.course-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.course-thumb {
  height: 180px;
  position: relative;
}
.course-level {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: rgba(0,0,0,.35);
  color: #fff;
  padding: .2rem .7rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.course-body { padding: 1.25rem; }
.course-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.course-title a { color: #1e293b; text-decoration: none; }
.course-title a:hover { color: #2563eb; }
.course-desc {
  font-size: .85rem;
  color: #64748b;
  margin-bottom: .75rem;
  line-height: 1.5;
}
.course-meta {
  display: flex;
  gap: 1rem;
  font-size: .8rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}
.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.course-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2563eb;
}
.btn-sm {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: .35rem .9rem;
  border-radius: .4rem;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
  display: inline-block;
}
.btn-sm:hover { background: #dbeafe; }
.btn-outline {
  background: transparent;
  color: #2563eb;
  border: 1.5px solid #2563eb;
  padding: .5rem 1.25rem;
  border-radius: .5rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background .15s;
}
.btn-outline:hover { background: #eff6ff; }

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f8fafc;
}
.auth-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .3rem;
}
.auth-sub {
  color: #64748b;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.auth-link {
  text-align: center;
  font-size: .88rem;
  color: #64748b;
  margin-top: 1.25rem;
}
.auth-link a { color: #2563eb; text-decoration: none; font-weight: 600; }

/* ── Course Page ─────────────────────────────────────────────── */
.course-page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
.sidebar-card {
  border: 1px solid #e2e8f0;
  border-radius: .875rem;
  overflow: hidden;
  position: sticky;
  top: 80px;
}

/* ── Lesson Page ─────────────────────────────────────────────── */
.lesson-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}
.lesson-sidebar {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow-y: auto;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}
.lesson-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.lesson-nav { padding: .5rem 0; }
.lesson-nav-section { margin-bottom: .25rem; }
.lesson-nav-section-title {
  padding: .6rem 1rem .35rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: .04em;
}
.lesson-nav-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .5rem 1rem;
  font-size: .83rem;
  color: #475569;
  text-decoration: none;
  transition: background .15s;
  line-height: 1.4;
}
.lesson-nav-item:hover { background: #e0f2fe; color: #0284c7; }
.lesson-nav-item.active { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.lesson-nav-item.done { color: #15803d; }
.lesson-main {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 860px;
}
.lesson-section-tag {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: .05em;
  display: block;
  margin-bottom: .4rem;
}
.lesson-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.lesson-header { margin-bottom: 1.5rem; }
.video-wrap {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: .5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.video-wrap iframe { width: 100%; height: 100%; border: none; }
.lesson-content {
  font-size: .95rem;
  line-height: 1.8;
  color: #374151;
}
.lesson-content p { margin-bottom: 1rem; }
.lesson-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.badge-complete {
  background: #dcfce7;
  color: #166534;
  padding: .5rem 1.25rem;
  border-radius: .4rem;
  font-size: .88rem;
  font-weight: 600;
}

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-header { margin-bottom: 1.5rem; }
.dashboard-header h1 { font-size: 1.8rem; font-weight: 800; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  padding: 1.25rem;
  text-align: center;
}
.dash-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: #2563eb;
}
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: .4rem;
}
.progress-bar-fill {
  background: #2563eb;
  height: 100%;
  border-radius: 99px;
  transition: width .4s;
}
.empty-state {
  text-align: center;
  padding: 3rem;
  background: #f8fafc;
  border-radius: .75rem;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lms-hero-content h1 { font-size: 1.8rem; }
  .course-page-grid { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .lesson-layout { flex-direction: column; }
  .lesson-sidebar { width: 100%; height: auto; position: static; }
  .lesson-main { padding: 1.5rem 1rem; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lms-nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: #fff; padding: 1rem; border-bottom: 1px solid #e2e8f0; z-index: 200; }
  .lms-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .lms-hero { padding: 3rem 0 2rem; }
  .lms-hero-content h1 { font-size: 1.5rem; }
  .hero-stats { gap: 1.5rem; }
  .stat strong { font-size: 1.5rem; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
}
