/* LearnCraft LMS — Public / Frontend Styles */
:root {
  --lc-primary:    #2563eb;
  --lc-secondary:  #4f46e5;
  --lc-accent:     #f59e0b;
  --lc-success:    #22c55e;
  --lc-warning:    #f59e0b;
  --lc-danger:     #ef4444;
  --lc-dark:       #0f172a;
  --lc-light:      #f8fafc;
  --lc-border:     #e2e8f0;
  --lc-text:       #334155;
  --lc-muted:      #94a3b8;
  --lc-radius:     12px;
  --lc-shadow:     0 4px 24px rgba(0,0,0,.08);
  --lc-shadow-lg:  0 12px 40px rgba(0,0,0,.14);
  --lc-hero-from:  #1e293b;
  --lc-hero-to:    #1a3a6c;
  --lc-btn-radius: 8px;
  /* Sidebar tokens */
  --lc-sb-bg:      #0f172a;
  --lc-sb-hover:   #1e293b;
  --lc-sb-active:  #1d4ed8;
  --lc-sb-text:    #94a3b8;
  --lc-sb-width:   260px;
}

*, *::before, *::after { box-sizing: border-box; }
.lc-wrap * { box-sizing: border-box; }

/* ══════════════════════════════════════════════════════════════════════════
   COURSE ARCHIVE / GRID
   ══════════════════════════════════════════════════════════════════════════ */
.lc-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.lc-course-list .lc-course-card { display: flex; gap: 20px; }
.lc-course-list .lc-course-thumb { width: 200px; flex-shrink: 0; }

.lc-course-card {
  background: #fff; border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius); overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  display: flex; flex-direction: column;
}
.lc-course-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.12); transform: translateY(-4px); }

.lc-course-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #f1f5f9; }
.lc-course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lc-course-card:hover .lc-course-thumb img { transform: scale(1.05); }
.lc-course-thumb .lc-level-badge { position: absolute; top: 10px; left: 10px; }
.lc-course-thumb .lc-price-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--lc-accent); color: var(--lc-dark); font-weight: 700;
  font-size: 13px; padding: 4px 10px; border-radius: 20px;
}
.lc-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 48px; color: #cbd5e1;
}
.lc-course-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.lc-course-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--lc-primary); font-weight: 600; margin-bottom: 6px; }
.lc-course-title { font-size: 17px; font-weight: 700; color: var(--lc-dark); margin: 0 0 8px; line-height: 1.35; }
.lc-course-title a { color: inherit; text-decoration: none; }
.lc-course-title a:hover { color: var(--lc-primary); }
.lc-course-excerpt { font-size: 13px; color: var(--lc-muted); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.lc-course-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--lc-muted); margin-bottom: 14px; }
.lc-course-meta span { display: flex; align-items: center; gap: 4px; }
.lc-course-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--lc-border); background: #fafbfc; }
.lc-course-price { font-size: 18px; font-weight: 700; color: var(--lc-primary); }
.lc-course-price.free { color: var(--lc-success); }

/* ══════════════════════════════════════════════════════════════════════════
   BADGES & BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.lc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.lc-badge-success  { background: #dcfce7; color: #16a34a; }
.lc-badge-danger   { background: #fee2e2; color: #dc2626; }
.lc-badge-warning  { background: #fef9c3; color: #a16207; }
.lc-badge-primary  { background: #dbeafe; color: #1d4ed8; }
.lc-badge-info     { background: #e0f2fe; color: #0369a1; }
.lc-badge-secondary{ background: #f1f5f9; color: #64748b; }

.lc-btn-enroll {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--lc-primary); color: #fff; font-weight: 600; font-size: 15px;
  padding: 12px 28px; border-radius: var(--lc-btn-radius); border: none; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s;
}
.lc-btn-enroll:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.35); }
.lc-btn-enroll:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }
.lc-btn-enroll.enrolled { background: var(--lc-success); }
.lc-btn-outline {
  background: transparent; border: 2px solid var(--lc-primary);
  color: var(--lc-primary); padding: 10px 24px; border-radius: 8px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; transition: all .2s; font-size: 14px;
}
.lc-btn-outline:hover { background: var(--lc-primary); color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   PROGRESS BARS
   ══════════════════════════════════════════════════════════════════════════ */
.lc-progress { height: 8px; background: #e2e8f0; border-radius: 20px; overflow: hidden; }
.lc-progress-bar { height: 100%; background: linear-gradient(90deg, var(--lc-primary), #60a5fa); border-radius: 20px; transition: width .4s; }

/* ══════════════════════════════════════════════════════════════════════════
   SINGLE COURSE
   ══════════════════════════════════════════════════════════════════════════ */
.lc-single-course { max-width: 1140px; margin: 0 auto; padding: 40px 20px; }
.lc-course-hero {
  background: linear-gradient(135deg, var(--lc-hero-from) 0%, var(--lc-hero-to) 100%);
  color: #fff; border-radius: var(--lc-radius); padding: 48px; margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.lc-course-hero::before {
  content: ''; position: absolute; top: -40%; right: -10%;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.lc-hero-breadcrumb { font-size: 13px; opacity: .7; margin-bottom: 12px; }
.lc-hero-breadcrumb a { color: #fff !important; text-decoration: underline; }
.lc-hero-title { font-size: 34px; font-weight: 800; margin: 0 0 12px; line-height: 1.2; color: #fff !important; }
.lc-hero-excerpt { font-size: 16px; opacity: .85; margin-bottom: 20px; line-height: 1.6; color: #fff !important; }
.lc-hero-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; opacity: .9; }
.lc-hero-meta span { display: flex; align-items: center; gap: 6px; color: #fff; }
.lc-course-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
@media (max-width: 992px) { .lc-course-layout { grid-template-columns: 1fr; } }

.lc-course-tabs { border-bottom: 2px solid var(--lc-border); display: flex; gap: 0; margin-bottom: 28px; overflow-x: auto; }
.lc-course-tab { padding: 12px 24px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--lc-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .15s, border-color .15s; }
.lc-course-tab:hover { color: var(--lc-primary); }
.lc-course-tab.active { color: var(--lc-primary); border-bottom-color: var(--lc-primary); }
.lc-tab-content { display: none; }
.lc-tab-content.active { display: block; }

.lc-outcomes { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--lc-radius); padding: 24px; margin-bottom: 28px; }
.lc-outcomes h3 { font-size: 17px; font-weight: 700; margin: 0 0 16px; color: var(--lc-dark); }
.lc-outcomes ul { columns: 2; gap: 16px; list-style: none; margin: 0; padding: 0; }
.lc-outcomes li { font-size: 14px; padding: 4px 0 4px 24px; position: relative; break-inside: avoid; }
.lc-outcomes li::before { content: '✓'; position: absolute; left: 0; color: var(--lc-primary); font-weight: 700; }
@media (max-width: 600px) { .lc-outcomes ul { columns: 1; } }

.lc-curriculum { margin-bottom: 28px; }
.lc-curriculum h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.lc-curriculum-section { border: 1px solid var(--lc-border); border-radius: var(--lc-radius); overflow: hidden; margin-bottom: 12px; }
.lc-curriculum-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--lc-border); font-size: 14px; }
.lc-curriculum-item:last-child { border-bottom: none; }
.lc-curriculum-item .lc-item-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.lc-item-lesson { background: #dbeafe; color: #1d4ed8; }
.lc-item-quiz   { background: #ede9fe; color: #7c3aed; }
.lc-item-title { flex: 1; font-weight: 500; color: var(--lc-dark); text-decoration: none; }
.lc-item-title:hover { color: var(--lc-primary); }
.lc-item-meta { font-size: 12px; color: var(--lc-muted); }
.lc-item-lock { color: var(--lc-muted); }
.lc-item-done { color: var(--lc-success); }

.lc-enroll-card { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); box-shadow: var(--lc-shadow); overflow: hidden; position: sticky; top: 20px; }
.lc-enroll-preview { position: relative; background: #1e293b; aspect-ratio: 16/9; }
.lc-enroll-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.lc-enroll-preview-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lc-enroll-preview-icon .lc-play-btn { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--lc-primary); cursor: pointer; }
.lc-enroll-body { padding: 24px; }
.lc-enroll-price { font-size: 32px; font-weight: 800; color: var(--lc-dark); margin-bottom: 16px; }
.lc-enroll-price.free { color: var(--lc-success); }
.lc-enroll-btn-wrap { margin-bottom: 20px; }
.lc-enroll-btn-wrap .lc-btn-enroll { width: 100%; font-size: 16px; padding: 14px; }
.lc-course-includes { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.lc-course-includes li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--lc-border); color: var(--lc-text); }
.lc-course-includes li:last-child { border-bottom: none; }
.lc-course-includes i { color: var(--lc-primary); font-size: 15px; width: 20px; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════════════════════════════════ */
.lc-search-bar { margin-bottom: 28px; }
.lc-search-inner { display: flex; background: #fff; border: 2px solid var(--lc-border); border-radius: 12px; overflow: hidden; }
.lc-search-inner i { padding: 14px; font-size: 18px; color: var(--lc-muted); }
.lc-search-inner input { flex: 1; border: none; padding: 12px 8px; font-size: 15px; outline: none; }
.lc-search-inner button { background: var(--lc-primary); color: #fff; border: none; padding: 12px 24px; font-size: 15px; font-weight: 600; cursor: pointer; }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN / REGISTER
   ══════════════════════════════════════════════════════════════════════════ */
/* Login page centering shell — sits directly inside <main class="lc-page-main"> */
.lc-auth-outer {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
  box-sizing: border-box;
}
.lc-auth-wrap { width: 100%; max-width: 440px; }
.lc-auth-card { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); padding: 36px; box-shadow: var(--lc-shadow); }
.lc-auth-logo {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 24px; text-align: center; width: 100%;
}
.lc-auth-logo img,
.lc-auth-site-logo { display: block !important; max-height: 80px; max-width: 200px; object-fit: contain; margin: 0 auto !important; align-self: center; }
.lc-auth-site-icon { display: block !important; width: 80px; height: 80px; object-fit: contain; border-radius: 14px; margin: 0 auto !important; align-self: center; }
.lc-auth-icon-placeholder {
  width: 72px; height: 72px; border-radius: 14px; margin: 0 auto;
  background: linear-gradient(135deg, var(--lc-primary) 0%, #4f46e5 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff; line-height: 1;
}
.lc-auth-site-name { font-size: 20px; font-weight: 800; color: var(--lc-dark); line-height: 1.2; text-align: center; width: 100%; }
.lc-auth-lms-label { font-size: 12px; font-weight: 700; color: var(--lc-primary); letter-spacing: .12em; text-transform: uppercase; text-align: center; width: 100%; }
.lc-form-group { margin-bottom: 16px; }
.lc-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--lc-dark); }
.lc-form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--lc-border); border-radius: 8px; font-size: 14px; transition: border-color .15s; }
.lc-form-group input:focus { border-color: var(--lc-primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.lc-auth-footer { text-align: center; font-size: 13px; color: var(--lc-muted); margin-top: 16px; }
.lc-auth-footer a { color: var(--lc-primary); }
.lc-auth-error { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════════════════════════
   Q&A / COMMENTS
   ══════════════════════════════════════════════════════════════════════════ */
.lc-qa-section { margin-top: 40px; padding-top: 32px; border-top: 2px solid var(--lc-border); }
.lc-qa-title { font-size: 18px; font-weight: 700; color: var(--lc-dark); margin: 0 0 20px; display: flex; align-items: center; gap: 8px; }
.lc-qa-count { font-size: 13px; color: var(--lc-muted); font-weight: 400; }
.lc-qa-empty { text-align: center; padding: 32px; color: var(--lc-muted); font-size: 14px; }
.lc-qa-item { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); padding: 16px; margin-bottom: 16px; display: flex; gap: 12px; }
.lc-qa-item.lc-qa-reply { background: #f8fafc; border-color: #e2e8f0; border-radius: 8px; padding: 12px; margin: 8px 0 0 44px; }
.lc-qa-avatar { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; object-fit: cover; }
.lc-qa-body { flex: 1; min-width: 0; }
.lc-qa-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.lc-qa-name { font-weight: 600; font-size: 14px; color: var(--lc-dark); }
.lc-qa-time { font-size: 12px; color: var(--lc-muted); }
.lc-qa-role-badge { background: #eff6ff; color: var(--lc-primary); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; border: 1px solid #bfdbfe; letter-spacing: .03em; }
.lc-qa-text { font-size: 14px; color: var(--lc-text); line-height: 1.65; margin-bottom: 6px; }
.lc-qa-reply-btn { background: none; border: none; color: var(--lc-primary); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 0; display: inline-flex; align-items: center; gap: 4px; }
.lc-qa-reply-btn:hover { text-decoration: underline; }
.lc-qa-replies { margin-top: 8px; padding-left: 44px; }
.lc-qa-reply { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid #f1f5f9; }
.lc-qa-reply:first-child { border-top: none; }
.lc-qa-form { margin-top: 20px; background: #f8fafc; border-radius: 10px; padding: 16px; display: flex; gap: 12px; }
.lc-qa-form-inner { flex: 1; }
.lc-qa-form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.lc-qa-textarea { width: 100%; border: 1px solid var(--lc-border); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; outline: none; transition: border-color .2s; }
.lc-qa-textarea:focus { border-color: var(--lc-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }

/* ══════════════════════════════════════════════════════════════════════════
   NOTIFICATION BELL
   ══════════════════════════════════════════════════════════════════════════ */
.lc-notif-wrap { position: relative; }
.lc-notif-bell { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 18px; color: #fff; position: relative; line-height: 1; display: inline-flex; align-items: center; transition: background .2s; }
.lc-notif-bell:hover { background: rgba(255,255,255,.2); }
.lc-notif-badge { position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 5px; min-width: 18px; text-align: center; }
.lc-notif-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: #fff; border: 1px solid var(--lc-border); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.16); z-index: 9999; overflow: hidden; display: none; }
.lc-notif-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--lc-border); font-size: 13px; font-weight: 600; color: var(--lc-dark); }
.lc-notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 13px; transition: background .15s; }
.lc-notif-item:last-child { border-bottom: none; }
.lc-notif-item.unread { background: #eff6ff; }
.lc-notif-item:hover { background: #f8fafc; }
.lc-notif-empty { padding: 24px 16px; text-align: center; color: var(--lc-muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ══════════════════════════════════════════════════════════════════════════
   APP SHELL — SIDEBAR DASHBOARD LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */
.lc-app {
  display: flex;
  height: 100%;
  overflow: hidden;
  background: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Sidebar ── */
.lc-sidebar {
  width: var(--lc-sb-width);
  flex-shrink: 0;
  background: var(--lc-sb-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 200;
  position: relative;
}

.lc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.lc-sidebar-brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--lc-primary), #7c3aed);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.lc-sidebar-brand-name {
  font-size: 15px; font-weight: 800; color: #fff;
  line-height: 1.2; letter-spacing: -.2px;
}
.lc-sidebar-brand-sub {
  font-size: 10px; color: var(--lc-sb-text); font-weight: 400;
  text-transform: uppercase; letter-spacing: .06em;
}

.lc-sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.lc-sidebar-user img {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2); object-fit: cover;
}
.lc-sidebar-user-info { min-width: 0; flex: 1; }
.lc-sidebar-user-name {
  font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lc-sidebar-user-role {
  font-size: 11px; color: var(--lc-sb-text);
  display: inline-block; margin-top: 2px;
}
.lc-sidebar-user-badge {
  font-size: 10px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--lc-primary), #7c3aed);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}

.lc-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.lc-sidebar-nav::-webkit-scrollbar { width: 4px; }
.lc-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.lc-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 2px; }
.lc-sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.35); }

.lc-sidebar-nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: rgba(148,163,184,.5); text-transform: uppercase;
  padding: 12px 20px 4px;
}

.lc-snav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: var(--lc-sb-text);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: none; background: none; width: 100%;
  text-align: left;
  position: relative;
  border-radius: 0;
  user-select: none;
}
.lc-snav-item:hover {
  background: var(--lc-sb-hover);
  color: #e2e8f0;
  text-decoration: none;
}
.lc-snav-item.active {
  background: var(--lc-sb-active);
  color: #fff;
}
.lc-snav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 24px;
  background: #60a5fa;
  border-radius: 0 3px 3px 0;
}
.lc-snav-item i {
  font-size: 17px; width: 20px; text-align: center; flex-shrink: 0;
}
.lc-snav-item span { flex: 1; }
.lc-snav-badge {
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 20px;
  min-width: 18px; text-align: center;
}
.lc-snav-badge-warn { background: #f59e0b; }

.lc-snav-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.07);
  margin: 6px 16px;
}

.lc-snav-logout { color: #f87171 !important; }
.lc-snav-logout:hover { background: rgba(239,68,68,.15) !important; color: #fca5a5 !important; }

.lc-sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

/* ── Main content area ── */
.lc-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── App topbar ── */
.lc-app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--lc-border);
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
  position: relative; z-index: 10;
}
.lc-app-topbar-left { display: flex; align-items: center; gap: 14px; }
.lc-sidebar-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--lc-text);
  padding: 6px; border-radius: 6px; line-height: 1;
  display: none;
  transition: background .15s;
}
.lc-sidebar-toggle:hover { background: #f1f5f9; }
.lc-app-topbar-title {
  font-size: 17px; font-weight: 700; color: var(--lc-dark);
}
.lc-app-topbar-right { display: flex; align-items: center; gap: 12px; }

/* Notification bell in topbar (light version) */
.lc-app-topbar .lc-notif-bell {
  background: #f1f5f9; border: 1px solid var(--lc-border);
  color: var(--lc-text);
}
.lc-app-topbar .lc-notif-bell:hover { background: #e2e8f0; }

/* ── Content scroll area ── */
.lc-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.lc-content::-webkit-scrollbar { width: 6px; }
.lc-content::-webkit-scrollbar-track { background: transparent; }
.lc-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.lc-content::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Mobile sidebar overlay ── */
.lc-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 150;
  transition: opacity .3s;
}

/* ── Welcome hero banner ── */
.lc-welcome-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #7c3aed 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  color: #fff;
  position: relative; overflow: hidden;
}
.lc-welcome-hero::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.lc-welcome-hero::after {
  content: '';
  position: absolute; bottom: -40px; right: 80px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.lc-welcome-hero-text { flex: 1; position: relative; z-index: 1; }
.lc-welcome-greeting {
  font-size: 13px; font-weight: 600; letter-spacing: .05em;
  opacity: .75; text-transform: uppercase; margin-bottom: 4px;
}
.lc-welcome-name {
  font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 6px;
}
.lc-welcome-sub { font-size: 13px; opacity: .8; }
.lc-welcome-hero-avatar {
  position: relative; z-index: 1; flex-shrink: 0;
}
.lc-welcome-hero-avatar img {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4); object-fit: cover;
}

/* ── Stat cards grid ── */
.lc-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.lc-stat-card {
  background: #fff;
  border: 1px solid var(--lc-border);
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow .2s, transform .2s;
  position: relative; overflow: hidden;
}
.lc-stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.lc-stat-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
}
.lc-stat-card.sc-blue::before   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.lc-stat-card.sc-green::before  { background: linear-gradient(90deg, #22c55e, #86efac); }
.lc-stat-card.sc-orange::before { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.lc-stat-card.sc-purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.lc-stat-card.sc-red::before    { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.lc-stat-card.sc-teal::before   { background: linear-gradient(90deg, #14b8a6, #5eead4); }
.lc-stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.sc-blue   .lc-stat-icon { background: #eff6ff; color: #2563eb; }
.sc-green  .lc-stat-icon { background: #f0fdf4; color: #16a34a; }
.sc-orange .lc-stat-icon { background: #fffbeb; color: #d97706; }
.sc-purple .lc-stat-icon { background: #f5f3ff; color: #7c3aed; }
.sc-red    .lc-stat-icon { background: #fff1f2; color: #dc2626; }
.sc-teal   .lc-stat-icon { background: #f0fdfa; color: #0d9488; }
.lc-stat-num { font-size: 28px; font-weight: 800; color: var(--lc-dark); line-height: 1; }
.lc-stat-label { font-size: 12px; font-weight: 600; color: var(--lc-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Panel titles ── */
.lc-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.lc-panel-title {
  font-size: 18px; font-weight: 800; color: var(--lc-dark);
  display: flex; align-items: center; gap: 8px;
}
.lc-panel-title i { color: var(--lc-primary); }

/* ── Panels show/hide ── */
.lc-panel { display: none; animation: lcFadeIn .2s ease; }
.lc-panel.active { display: block; }
@keyframes lcFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Dashboard course card ── */
.lc-dash-course-card {
  background: #fff; border: 1px solid var(--lc-border);
  border-radius: 14px; margin-bottom: 16px;
  display: flex; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}
.lc-dash-course-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.lc-dash-course-thumb {
  width: 220px; flex-shrink: 0; position: relative; background: #f1f5f9; overflow: hidden;
}
.lc-dash-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lc-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 42px; color: #cbd5e1; }
.lc-dash-course-badge { position: absolute; bottom: 8px; left: 8px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: flex; align-items: center; gap: 4px; }
.lc-dash-course-badge.completed { background: var(--lc-success); color: #fff; }
.lc-dash-course-body { flex: 1; padding: 20px 24px; overflow: hidden; }
.lc-dash-course-title { font-size: 16px; font-weight: 700; color: var(--lc-dark); margin: 0 0 10px; }
.lc-dash-course-title a { color: inherit; text-decoration: none; }
.lc-dash-course-title a:hover { color: var(--lc-primary); }
.lc-dash-progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.lc-dash-pct { font-size: 14px; font-weight: 700; color: var(--lc-primary); width: 38px; text-align: right; flex-shrink: 0; }

/* Curriculum breakdown in dash */
.lc-dash-curriculum { border: 1px solid var(--lc-border); border-radius: 8px; overflow: hidden; }
.lc-dash-section { border-bottom: 1px solid var(--lc-border); }
.lc-dash-section:last-child { border-bottom: none; }
.lc-dash-sec-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc; }
.lc-dash-sec-count { font-size: 11px; color: var(--lc-muted); font-weight: 600; }
.lc-dash-sec-items { padding: 4px 0; }
.lc-dash-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 20px; border-top: 1px solid #f1f5f9; }
.lc-dash-item:first-child { border-top: none; }
.lc-dash-item.done i { color: var(--lc-success) !important; }
.lc-dash-item.locked i { color: var(--lc-muted) !important; }
.lc-dash-next-tag { background: var(--lc-primary); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }

/* Layout toggle */
.lc-layout-toggle-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.lc-layout-toggle-bar .lc-courses-count { font-size: 14px; font-weight: 600; color: var(--lc-muted); }
.lc-layout-toggle { display: flex; gap: 4px; background: #f1f5f9; border-radius: 8px; padding: 4px; }
.lc-ltoggle { background: transparent; border: none; cursor: pointer; padding: 6px 10px; border-radius: 6px; color: var(--lc-muted); font-size: 16px; transition: all .15s; line-height: 1; }
.lc-ltoggle:hover { color: var(--lc-primary); background: #fff; }
.lc-ltoggle.active { background: #fff; color: var(--lc-primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

.lc-dash-courses-grid2,
.lc-dash-courses-grid3 { display: grid; gap: 16px; }
.lc-dash-courses-grid2 { grid-template-columns: repeat(2, 1fr); }
.lc-dash-courses-grid3 { grid-template-columns: repeat(3, 1fr); }
.lc-dash-courses-grid2 .lc-dash-course-card,
.lc-dash-courses-grid3 .lc-dash-course-card { flex-direction: column; margin-bottom: 0; }
.lc-dash-courses-grid2 .lc-dash-course-thumb,
.lc-dash-courses-grid3 .lc-dash-course-thumb { width: 100%; height: 140px; }
.lc-dash-courses-grid2 .lc-dash-course-body,
.lc-dash-courses-grid3 .lc-dash-course-body { padding: 16px 18px; }
/* curriculum tree always visible regardless of layout mode */
@media (max-width: 1024px) { .lc-dash-courses-grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .lc-dash-courses-grid2, .lc-dash-courses-grid3 { grid-template-columns: 1fr; } }

/* ── Empty state ── */
.lc-dash-empty {
  text-align: center; padding: 60px 20px; color: var(--lc-muted);
  background: #fff; border-radius: 14px; border: 1px dashed var(--lc-border);
}
.lc-dash-empty i { font-size: 48px; display: block; margin-bottom: 12px; opacity: .5; }
.lc-dash-empty p { font-size: 15px; margin-bottom: 16px; }

/* ── Dashboard table ── */
.lc-dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lc-dash-table th { background: #f8fafc; color: var(--lc-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--lc-border); white-space: nowrap; }
.lc-dash-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: var(--lc-text); vertical-align: middle; }
.lc-dash-table tr:last-child td { border-bottom: none; }
.lc-dash-table tr:hover td { background: #f8fafc; }

/* ── Activity feed ── */
.lc-activity-list { display: flex; flex-direction: column; gap: 0; }
.lc-activity-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.lc-activity-item:last-child { border-bottom: none; }
.lc-activity-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.lc-activity-icon.lesson { background: #eff6ff; color: var(--lc-primary); }
.lc-activity-icon.quiz   { background: #f0fdf4; color: var(--lc-success); }

/* ── Assignments ── */
.lc-assign-course-group { margin-bottom: 32px; }
.lc-assign-course-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--lc-dark); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--lc-border); }
.lc-assign-card { background: #fff; border: 1px solid var(--lc-border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.lc-assign-card-head { display: flex; align-items: flex-start; gap: 14px; }
.lc-assign-title { font-size: 15px; font-weight: 700; color: var(--lc-dark); }
.lc-assign-desc { font-size: 13px; color: var(--lc-muted); line-height: 1.6; margin: 6px 0 0; }
.lc-assign-type-toggle { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.lc-assign-type-btn { background: #f1f5f9; border: 2px solid transparent; border-radius: 8px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--lc-muted); transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.lc-assign-type-btn.active { background: var(--lc-primary); color: #fff; border-color: var(--lc-primary); }
.lc-assign-file-drop { border: 2px dashed var(--lc-border); border-radius: 10px; padding: 24px; text-align: center; background: #f8fafc; transition: border-color .2s, background .2s; cursor: pointer; }
.lc-assign-file-drop.dragover { border-color: var(--lc-primary); background: #eff6ff; }
.lc-assign-feedback { background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.lc-assign-feedback-head { font-size: 13px; font-weight: 700; color: #16a34a; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lc-assign-grade-row { font-size: 14px; color: var(--lc-text); display: flex; align-items: center; gap: 6px; }
.lc-assign-grade-row strong { font-size: 18px; color: var(--lc-success); }
.lc-assign-text-preview { font-size: 13px; color: var(--lc-muted); font-style: italic; background: #f8fafc; padding: 8px 12px; border-radius: 6px; }
.lc-assign-submitted-notice { display: flex; align-items: center; gap: 12px; background: #fefce8; border: 1px solid #fde047; border-radius: 10px; padding: 12px 16px; margin-top: 14px; flex-wrap: wrap; font-size: 14px; }

/* Supporting docs */
.lc-course-docs-section { background: #f8fafc; border: 1px solid var(--lc-border); border-radius: 10px; padding: 16px; margin-top: 14px; }
.lc-docs-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--lc-dark); margin-bottom: 12px; }
.lc-docs-list { display: flex; flex-direction: column; gap: 8px; }
.lc-doc-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--lc-border); border-radius: 8px; padding: 10px 12px; }

/* Chat styles shared */
.lc-chat-section { margin-bottom: 24px; }
.lc-chat-course-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--lc-dark); padding: 10px 0; border-bottom: 1px solid var(--lc-border); margin-bottom: 12px; }
.lc-chatbox { border: 1px solid var(--lc-border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.lc-chat-messages { min-height: 200px; max-height: 380px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.lc-chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--lc-muted); font-size: 14px; padding: 32px; text-align: center; }
.lc-chat-bubble-wrap { display: flex; align-items: flex-end; gap: 8px; }
.lc-chat-bubble-wrap.self { flex-direction: row-reverse; }
.lc-chat-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.lc-chat-bubble-inner { display: flex; flex-direction: column; max-width: 72%; }
.lc-chat-sender { font-size: 11px; font-weight: 600; color: var(--lc-muted); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.lc-chat-bubble { padding: 9px 14px; border-radius: 18px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.bubble-self { background: var(--lc-primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-other { background: #f3f4f6; color: var(--lc-text); border-bottom-left-radius: 4px; }
.lc-chat-time { font-size: 10px; color: var(--lc-muted); margin-top: 3px; }
.lc-chat-bubble-wrap.self .lc-chat-time { text-align: right; }
.lc-chat-bubble-wrap.self .lc-chat-bubble-inner { align-items: flex-end; }
.lc-chat-input-bar { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--lc-border); background: #f9fafb; }
.lc-chat-input { flex: 1; resize: none; border: 1px solid var(--lc-border); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: inherit; outline: none; min-height: 36px; max-height: 80px; line-height: 1.4; }
.lc-chat-input:focus { border-color: var(--lc-primary); }
.lc-chat-send-btn { flex-shrink: 0; padding: 8px 14px; font-size: 14px; border-radius: 8px; }

/* ── Instructor dashboard course blocks ── */
.lc-inst-course-block { background: #fff; border: 1px solid var(--lc-border); border-radius: 14px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.lc-inst-course-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.lc-inst-qa-list { display: flex; flex-direction: column; gap: 16px; }
.lc-inst-qa-item { background: #fff; border: 1px solid var(--lc-border); border-radius: 14px; padding: 16px; }
.lc-qa-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.lc-qa-content { font-size: 14px; color: var(--lc-text); line-height: 1.65; padding-left: 44px; }
.lc-qa-reply-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-top: 1px solid #f1f5f9; }
.lc-qa-reply-item:first-child { border-top: none; }
.lc-inst-reply-form { margin-top: 10px; padding-left: 44px; }

/* ══════════════════════════════════════════════════════════════════════════
   SPLIT-PANEL LESSON / QUIZ LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */
body.lc-lesson-page,
body.lc-quiz-page { overflow: hidden; height: 100vh; }
body.lc-lesson-page .lc-page-main,
body.lc-quiz-page  .lc-page-main { padding: 0 !important; height: calc(100vh - 60px); overflow: hidden; max-width: none; }

/* Full-screen lesson shell */
.lc-lesson-app {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* Lesson sidebar */
.lc-lesson-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--lc-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: transform .3s;
}
.lc-lesson-sidebar.collapsed { transform: translateX(-100%); }
.lc-lesson-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--lc-border);
  background: #f8fafc;
  flex-shrink: 0;
}
.lc-lesson-sidebar-title {
  font-size: 13px; font-weight: 700; color: var(--lc-dark);
  margin-bottom: 8px; line-height: 1.4;
}
.lc-lesson-sidebar-progress { margin-bottom: 4px; }
.lc-lesson-sidebar-pct { font-size: 11px; color: var(--lc-muted); margin-top: 4px; }

.lc-lesson-sidebar-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.lc-lesson-sidebar-body::-webkit-scrollbar { width: 4px; }
.lc-lesson-sidebar-body::-webkit-scrollbar-track { background: transparent; }
.lc-lesson-sidebar-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.lc-lesson-section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px; font-weight: 700; color: var(--lc-dark);
  cursor: pointer; user-select: none;
  transition: background .15s;
}
.lc-lesson-section-head:hover { background: #f1f5f9; }
.lc-lesson-section-head i.lc-chev { margin-left: auto; font-size: 11px; color: var(--lc-muted); transition: transform .2s; }
.lc-lesson-section-head.open i.lc-chev { transform: rotate(180deg); }

.lc-lesson-section-body { }

.lc-lesson-sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid #f9fafb;
  font-size: 13px; text-decoration: none;
  color: var(--lc-text);
  transition: background .15s;
  position: relative;
}
.lc-lesson-sb-item:hover { background: #f8fafc; text-decoration: none; }
.lc-lesson-sb-item.current {
  background: #eff6ff;
  color: var(--lc-primary);
  font-weight: 600;
}
.lc-lesson-sb-item.current::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--lc-primary);
}
.lc-lesson-sb-item.done { color: var(--lc-muted); }
.lc-lesson-sb-icon { font-size: 13px; flex-shrink: 0; width: 16px; text-align: center; }
.lc-lesson-sb-title { flex: 1; line-height: 1.4; }
.lc-lesson-sb-check { color: var(--lc-success); font-size: 12px; flex-shrink: 0; }
.lc-lesson-sb-lock { color: var(--lc-muted); font-size: 11px; flex-shrink: 0; }
.lc-lesson-sb-dur { font-size: 11px; color: var(--lc-muted); flex-shrink: 0; }

/* Lesson content area */
.lc-lesson-content-area {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: #f8fafc;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.lc-lesson-content-area::-webkit-scrollbar { width: 6px; }
.lc-lesson-content-area::-webkit-scrollbar-track { background: transparent; }
.lc-lesson-content-area::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.lc-lesson-inner { max-width: 800px; margin: 0 auto; padding: 32px 24px 80px; }

/* ── Lesson / Quiz post content — tables always show borders ── */
.lc-lesson-inner table, .lc-quiz-inner table {
  border-collapse: collapse; width: 100%; margin: 16px 0;
}
.lc-lesson-inner th, .lc-lesson-inner td,
.lc-quiz-inner  th, .lc-quiz-inner  td {
  border: 1px solid #ccc !important; padding: 7px 10px;
  text-align: left; vertical-align: top;
}
.lc-lesson-inner th, .lc-quiz-inner th {
  background: #f8f9fa; font-weight: 600;
}
.lc-lesson-inner img, .lc-quiz-inner img { max-width: 100%; height: auto; }

/* Top nav bar inside lesson */
.lc-lesson-nav-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid var(--lc-border); border-radius: 12px;
  padding: 10px 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.lc-lesson-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--lc-primary);
  text-decoration: none; padding: 6px 12px;
  border-radius: 8px; transition: background .15s;
}
.lc-lesson-nav-btn:hover { background: #eff6ff; text-decoration: none; }
.lc-lesson-nav-course {
  font-size: 13px; font-weight: 600; color: var(--lc-dark);
  text-decoration: none; text-align: center; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 260px;
}
.lc-lesson-nav-course:hover { color: var(--lc-primary); }

/* Sidebar toggle button (inside lesson topbar) */
.lc-lesson-toggle-btn {
  background: var(--lc-primary); color: #fff; border: none;
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: background .15s; flex-shrink: 0;
}
.lc-lesson-toggle-btn:hover { background: #1d4ed8; }

.lc-lesson-num-label {
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--lc-primary);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.lc-lesson-title { font-size: 26px; font-weight: 800; color: var(--lc-dark); margin: 0 0 20px; line-height: 1.25; }

.lc-video-wrap { border-radius: 12px; overflow: hidden; margin-bottom: 24px; background: #000; aspect-ratio: 16/9; }
.lc-video-wrap iframe { width: 100%; height: 100%; border: none; }

.lc-lesson-content { font-size: 16px; line-height: 1.8; color: var(--lc-text); }
.lc-lesson-content h2, .lc-lesson-content h3, .lc-lesson-content h4 { color: var(--lc-dark); margin-top: 28px; }

/* Complete bar (sticky bottom of content area) */
.lc-complete-bar {
  position: sticky; bottom: 0;
  background: #fff; border-top: 1px solid var(--lc-border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.lc-complete-bar .lc-progress-info { font-size: 13px; color: var(--lc-muted); display: flex; align-items: center; gap: 8px; }

/* ══════════════════════════════════════════════════════════════════════════
   QUIZ PAGE
   ══════════════════════════════════════════════════════════════════════════ */
.lc-quiz-app { display: flex; height: 100%; overflow: hidden; }

.lc-quiz-content-area {
  flex: 1; min-width: 0; overflow-y: auto;
  background: #f8fafc;
  scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent;
}
.lc-quiz-content-area::-webkit-scrollbar { width: 6px; }
.lc-quiz-content-area::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
.lc-quiz-inner { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; }

.lc-quiz-breadcrumb { font-size: 13px; color: var(--lc-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.lc-quiz-breadcrumb a { color: var(--lc-primary); text-decoration: none; }
.lc-quiz-header { text-align: center; margin-bottom: 28px; }
.lc-quiz-header h1 { font-size: 26px; font-weight: 800; color: var(--lc-dark); margin-bottom: 8px; }
.lc-quiz-meta-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.lc-quiz-meta-pills span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--lc-muted); background: #fff; padding: 4px 12px; border-radius: 20px; border: 1px solid var(--lc-border); }
.lc-quiz-prev-result { margin-top: 14px; background: #fff; border: 1px solid var(--lc-border); border-radius: 10px; padding: 12px 16px; }
.lc-quiz-gated { text-align: center; padding: 48px 20px; background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); }
.lc-quiz-gated h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--lc-dark); }
.lc-quiz-gated p { color: var(--lc-muted); margin-bottom: 16px; }
.lc-section-locked { background: #fef3c7; border-color: #fde68a; }
.lc-section-locked h3 { color: #92400e; }
.lc-section-locked p { color: #92400e; }
.lc-quiz-info-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--lc-border); border-radius: 10px; margin-bottom: 20px; font-size: 13px; color: var(--lc-muted); }
.lc-quiz-info-bar span { display: flex; align-items: center; gap: 5px; }
.lc-quiz-timer { background: #fff; border: 2px solid var(--lc-primary); color: var(--lc-primary); font-size: 22px; font-weight: 700; padding: 8px 24px; border-radius: 8px; text-align: center; margin-bottom: 24px; }
.lc-quiz-timer.warning { border-color: var(--lc-danger); color: var(--lc-danger); }

.lc-question-card { background: #fff; border: 1px solid var(--lc-border); border-radius: 14px; padding: 24px; margin-bottom: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.lc-question-num { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--lc-muted); margin-bottom: 8px; font-weight: 700; }
.lc-question-text { font-size: 17px; font-weight: 600; color: var(--lc-dark); margin-bottom: 20px; line-height: 1.5; }
.lc-options { display: flex; flex-direction: column; gap: 10px; }
.lc-option-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid var(--lc-border); border-radius: 10px; cursor: pointer; font-size: 15px; transition: border-color .15s, background .15s; }
.lc-option-label:hover { border-color: var(--lc-primary); background: #eff6ff; }
.lc-option-label input[type="radio"] { width: 18px; height: 18px; accent-color: var(--lc-primary); }
.lc-option-label.selected { border-color: var(--lc-primary); background: #eff6ff; }
.lc-option-label.correct  { border-color: var(--lc-success); background: #dcfce7; }
.lc-option-label.incorrect { border-color: var(--lc-danger); background: #fee2e2; }
.lc-short-answer input, .lc-short-answer-input { width: 100%; padding: 12px; border: 2px solid var(--lc-border); border-radius: 10px; font-size: 15px; outline: none; }
.lc-short-answer input:focus, .lc-short-answer-input:focus { border-color: var(--lc-primary); }
.lc-quiz-submit { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 32px; padding-bottom: 16px; }
.lc-quiz-submit button { padding: 14px 40px; font-size: 16px; }

/* Quiz results */
.lc-quiz-result { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); padding: 36px 24px; text-align: center; max-width: 680px; margin: 0 auto; }
.lc-result-icon { font-size: 52px; line-height: 1; margin-bottom: 12px; }
.lc-result-score-ring { position: relative; width: 140px; height: 140px; margin: 0 auto 20px; }
.lc-ring-svg { width: 100%; height: 100%; }
.lc-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lc-ring-score { font-size: 28px; font-weight: 800; color: var(--lc-dark); line-height: 1; }
.lc-ring-status { font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-top: 2px; }
.lc-result-message { font-size: 16px; color: var(--lc-text); margin-bottom: 20px; }
.lc-result-passing { font-size: 13px; color: var(--lc-muted); margin-bottom: 20px; }
.lc-result-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lc-rstat { min-width: 72px; padding: 12px; border-radius: 10px; border: 1px solid var(--lc-border); }
.lc-rstat-num { font-size: 22px; font-weight: 800; line-height: 1; }
.lc-rstat-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; color: var(--lc-muted); }
.lc-rstat-correct { background: #f0fdf4; border-color: #bbf7d0; } .lc-rstat-correct .lc-rstat-num { color: #16a34a; }
.lc-rstat-wrong   { background: #fff1f2; border-color: #fecaca; } .lc-rstat-wrong   .lc-rstat-num { color: #dc2626; }
.lc-rstat-skip    { background: #fef9c3; border-color: #fde68a; } .lc-rstat-skip    .lc-rstat-num { color: #d97706; }
.lc-rstat-total   { background: var(--lc-light); }                .lc-rstat-total   .lc-rstat-num { color: var(--lc-dark); }
.lc-result-actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.lc-result-review { border-top: 1px solid var(--lc-border); padding-top: 20px; text-align: left; margin-top: 8px; }
.lc-result-review-title { font-size: 14px; font-weight: 700; color: var(--lc-dark); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }
.lc-review-item { border: 1px solid var(--lc-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.lc-review-pass { border-color: #bbf7d0; background: #f0fdf4; }
.lc-review-fail { border-color: #fecaca; background: #fff1f2; }
.lc-review-q-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.lc-review-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.lc-review-num { font-size: 12px; font-weight: 700; color: var(--lc-muted); flex-shrink: 0; margin-top: 2px; }
.lc-review-title { font-size: 14px; font-weight: 600; color: var(--lc-dark); flex: 1; }
.lc-review-ans { font-size: 13px; color: var(--lc-text); margin-left: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.lc-review-correct { color: #16a34a; font-weight: 600; }
.lc-review-explain { margin-left: 24px; margin-top: 6px; font-size: 12px; color: #64748b; background: #fef9c3; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 10px; display: flex; align-items: flex-start; gap: 6px; }

/* ══════════════════════════════════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════════════════════════════════ */
.lc-profile-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 20px 60px; }
.lc-profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .lc-profile-layout { grid-template-columns: 1fr; } }
.lc-profile-sidebar-card { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); padding: 28px 20px; text-align: center; box-shadow: var(--lc-shadow); position: sticky; top: 20px; }
.lc-profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 14px; }
.lc-profile-avatar-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--lc-border); display: block; }
.lc-avatar-upload-btn { position: absolute; bottom: 0; right: 0; background: var(--lc-primary); color: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; border: 2px solid #fff; transition: background .2s; }
.lc-avatar-upload-btn:hover { background: #1558a3; }
.lc-profile-sidebar-name { font-size: 18px; font-weight: 700; color: var(--lc-dark); margin-bottom: 4px; }
.lc-profile-sidebar-role { font-size: 12px; color: var(--lc-primary); font-weight: 600; background: #eff6ff; padding: 3px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px; }
.lc-profile-mini-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--lc-border); border-bottom: 1px solid var(--lc-border); }
.lc-pms-item { text-align: center; }
.lc-pms-num { font-size: 22px; font-weight: 800; color: var(--lc-primary); }
.lc-pms-lbl { font-size: 11px; color: var(--lc-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lc-profile-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; text-align: left; }
.lc-profile-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--lc-text); text-decoration: none; transition: background .15s, color .15s; }
.lc-profile-nav-item:hover { background: #eff6ff; color: var(--lc-primary); }
.lc-profile-nav-item i { width: 20px; text-align: center; font-size: 15px; }
.lc-profile-nav-logout { color: var(--lc-danger) !important; }
.lc-profile-nav-logout:hover { background: #fff1f2 !important; }
.lc-profile-header { margin-bottom: 20px; }
.lc-profile-title { font-size: 26px; font-weight: 800; color: var(--lc-dark); margin: 0 0 4px; }
.lc-profile-subtitle { font-size: 14px; color: var(--lc-muted); margin: 0; }
.lc-profile-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--lc-border); margin-bottom: 24px; overflow-x: auto; }
.lc-profile-tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--lc-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; text-decoration: none; transition: color .15s, border-color .15s; }
.lc-profile-tab:hover { color: var(--lc-primary); }
.lc-profile-tab.active { color: var(--lc-primary); border-bottom-color: var(--lc-primary); }
.lc-profile-alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.lc-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.lc-alert-error   { background: #fff1f2; border: 1px solid #fecaca; color: #991b1b; }
.lc-profile-card { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); overflow: hidden; box-shadow: var(--lc-shadow); margin-bottom: 24px; }
.lc-profile-card-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; background: var(--lc-light); border-bottom: 1px solid var(--lc-border); font-weight: 700; font-size: 15px; color: var(--lc-dark); }
.lc-profile-form { padding: 24px 20px; }
.lc-pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .lc-pf-row { grid-template-columns: 1fr; } }
.lc-pf-group { margin-bottom: 18px; }
.lc-pf-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--lc-dark); margin-bottom: 6px; }
.lc-pf-group input, .lc-pf-group textarea, .lc-pf-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--lc-border); border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color .15s; color: var(--lc-text); }
.lc-pf-group input:focus, .lc-pf-group textarea:focus { border-color: var(--lc-primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.lc-pf-group textarea { resize: vertical; min-height: 110px; }
.lc-pf-hint { font-size: 12px; color: var(--lc-muted); margin-top: 4px; display: block; }
.lc-pf-actions { padding-top: 8px; border-top: 1px solid var(--lc-border); margin-top: 8px; display: flex; gap: 10px; }
.lc-pf-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; transition: all .15s; }
.lc-pf-btn-primary { background: var(--lc-primary); color: #fff; }
.lc-pf-btn-primary:hover { background: #1d4ed8; color: #fff; }
.lc-pf-btn-outline { background: transparent; border: 2px solid var(--lc-primary); color: var(--lc-primary); }
.lc-pf-btn-outline:hover { background: var(--lc-primary); color: #fff; }
.lc-pf-btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 6px; border: 1px solid var(--lc-border); background: #fff; color: var(--lc-text); }
.lc-pf-btn-sm:hover { border-color: var(--lc-primary); color: var(--lc-primary); }
.lc-pf-count-badge { background: var(--lc-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: auto; }
.lc-pf-empty { text-align: center; padding: 48px 20px; color: var(--lc-muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lc-pf-empty i { font-size: 48px; opacity: .4; }
.lc-pf-empty p { font-size: 15px; margin: 0; }
.lc-pf-course-list { padding: 8px 0; }
.lc-pf-course-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid #f1f5f9; }
.lc-pf-course-row:last-child { border-bottom: none; }
.lc-pf-course-thumb { width: 72px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.lc-pf-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lc-pf-thumb-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--lc-muted); }
.lc-pf-course-info { flex: 1; min-width: 0; }
.lc-pf-course-name { font-weight: 600; font-size: 14px; color: var(--lc-dark); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.lc-pf-course-name:hover { color: var(--lc-primary); }
.lc-pf-course-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--lc-muted); align-items: center; }
.lc-pf-course-meta span { display: flex; align-items: center; gap: 4px; }
.lc-pf-course-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   SPINNER
   ══════════════════════════════════════════════════════════════════════════ */
.lc-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: lc-spin .7s linear infinite;
}
@keyframes lc-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   LOCKED / GATED
   ══════════════════════════════════════════════════════════════════════════ */
.lc-locked-lesson { text-align: center; padding: 48px 20px; background: #fef3c7; border: 1px solid #fde68a; border-radius: 14px; }
.lc-locked-lesson h3 { font-size: 20px; font-weight: 700; color: #92400e; margin-bottom: 8px; }
.lc-locked-lesson p { color: #92400e; margin-bottom: 16px; }
.lc-cert-card { background: linear-gradient(135deg,#fff 60%,#eff6ff); border: 1px solid #bfdbfe; border-radius: var(--lc-radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.lc-cert-icon { font-size: 40px; color: var(--lc-accent); }
.lc-cert-info .lc-cert-course { font-weight: 600; font-size: 15px; }
.lc-cert-info .lc-cert-date { font-size: 13px; color: var(--lc-muted); }
.lc-cert-download { margin-left: auto; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .lc-course-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 767px) {
  /* Sidebar collapses off-screen on mobile */
  .lc-sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%);
    height: 100vh;
    z-index: 300;
  }
  .lc-sidebar.open { transform: translateX(0); }
  .lc-sidebar-overlay.open { display: block; }
  .lc-sidebar-toggle { display: flex !important; }

  /* Lesson sidebar collapses on mobile */
  .lc-lesson-sidebar {
    position: fixed; left: 0; top: 60px;
    height: calc(100vh - 60px);
    z-index: 300;
    box-shadow: 4px 0 24px rgba(0,0,0,.2);
    transform: translateX(-100%);
  }
  .lc-lesson-sidebar.open { transform: translateX(0); }
  .lc-lesson-toggle-btn { display: flex; }
  .lc-lesson-inner { padding: 20px 16px 80px; }

  .lc-dash-course-card { flex-direction: column; }
  .lc-dash-course-thumb { width: 100%; height: 160px; }
  .lc-stats-row { grid-template-columns: 1fr 1fr; }
  .lc-welcome-hero { padding: 20px; }
  .lc-welcome-hero-avatar { display: none; }
  .lc-welcome-name { font-size: 20px; }
  .lc-content { padding: 16px; }
  .lc-course-grid { grid-template-columns: 1fr; }
  .lc-hero-title { font-size: 24px; }
  .lc-outcomes ul { columns: 1; }
  .lc-quiz-result { padding: 24px 16px; }
  .lc-result-stats { gap: 8px; }
  .lc-rstat { min-width: 60px; padding: 10px; }
  .lc-notif-dropdown { width: 280px; right: -40px; }
}

@media (max-width: 480px) {
  .lc-stats-row { grid-template-columns: 1fr; }
  .lc-app-topbar { padding: 0 14px; }
  .lc-app-topbar-title { font-size: 15px; }
}
