/* ============================================================
   Princeton Academy LMS — Professional Stylesheet
   Design: Deep Indigo (#393185) + Gold (#f5a623)
   ============================================================ */

/* ---------- 0. GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --primary:        #393185;
  --primary-dark:   #2a2464;
  --primary-light:  #5a52b8;
  --primary-xlight: #eeedf8;
  --accent:         #f5a623;
  --accent-dark:    #d4891a;
  --accent-light:   #fff4e0;
  --success:        #22c55e;
  --success-light:  #dcfce7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --info:           #3b82f6;
  --info-light:     #dbeafe;

  --bg-body:        #f0f2f7;
  --bg-card:        #ffffff;
  --bg-light:       #f7f8fc;
  --bg-sidebar:     #1e1a4e;

  --text-body:      #1e1b4b;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;
  --border:         #e5e7eb;
  --border-focus:   #393185;

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --shadow-sm:      0 1px 3px rgba(57,49,133,0.08), 0 1px 2px rgba(57,49,133,0.06);
  --shadow-md:      0 4px 16px rgba(57,49,133,0.10), 0 2px 6px rgba(57,49,133,0.07);
  --shadow-lg:      0 10px 32px rgba(57,49,133,0.14), 0 4px 12px rgba(57,49,133,0.08);
  --shadow-xl:      0 20px 48px rgba(57,49,133,0.18);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700; color: var(--text-body); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { color: var(--text-muted); }
ul { list-style: none; }
img { max-width: 100%; }

main { flex: 1; }

/* ---------- 3. TOP BAR ---------- */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  padding: 5px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ---------- 4. HEADER / NAV ---------- */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-section { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-text { font-size: 1.2rem; font-weight: 800; color: var(--primary); display: block; line-height: 1.2; }
.logo-tag  { font-size: 0.68rem; font-weight: 500; color: var(--text-muted); display: block; letter-spacing: 0.05em; }

nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-xlight); }
.nav-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-xlight);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

/* ---------- 5. MAIN CONTENT WRAPPER ---------- */
#app-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  width: 100%;
}

/* ---------- 6. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover   { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 14px rgba(57,49,133,0.35); transform: translateY(-1px); }

.btn-accent    { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover    { background: var(--accent-dark); color: var(--primary-dark); box-shadow: 0 4px 14px rgba(245,166,35,0.4); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-light); color: var(--text-body); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: #fff; border-color: var(--primary); color: var(--primary); }

.btn-danger    { background: var(--danger-light); color: var(--danger); border: 1.5px solid transparent; }
.btn-danger:hover    { background: var(--danger); color: #fff; }

.btn-success   { background: var(--success-light); color: #166534; border: 1.5px solid transparent; }
.btn-success:hover   { background: var(--success); color: #fff; }

.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover   { background: var(--primary); color: #fff; }

.btn-sm   { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg   { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; min-width: 36px; height: 36px; justify-content: center; }
.mr-2 { margin-right: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ---------- 7. BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-primary { background: var(--primary-xlight); color: var(--primary); }
.badge-accent  { background: var(--accent-light); color: var(--accent-dark); }
.badge-success { background: var(--success-light); color: #166534; }
.badge-danger  { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info    { background: var(--info-light); color: #1e40af; }
.badge-muted   { background: var(--bg-light); color: var(--text-muted); border: 1px solid var(--border); }

/* ---------- 8. CARDS ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-elevated { box-shadow: var(--shadow-md); }
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-body); }
.card-body  { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- 9. CATALOG GRID ---------- */
.catalog-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.catalog-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.catalog-header::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 280px; height: 280px;
  background: rgba(245,166,35,0.10);
  border-radius: 50%;
}
.catalog-header h1 { color: #fff; font-size: 2rem; margin-bottom: 8px; position: relative; z-index: 1; }
.catalog-header p  { color: rgba(255,255,255,0.75); position: relative; z-index: 1; font-size: 1rem; }

.catalog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: center;
}
.filter-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.course-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-card-banner {
  height: 8px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.course-card-body   { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-light); display: flex; justify-content: space-between; align-items: center; }
.course-card-meta   { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: 0.82rem; color: var(--text-muted); }
.course-card-meta span { display: flex; align-items: center; gap: 7px; }
.course-card-meta i { color: var(--primary); width: 14px; text-align: center; }
.course-card-title { font-size: 1rem; font-weight: 700; color: var(--text-body); margin: 8px 0 6px; line-height: 1.4; }
.course-card-desc  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; flex: 1; }

/* ---------- 10. DASHBOARD LAYOUT ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.sidebar-panel {
  background: var(--bg-sidebar);
  border-radius: var(--radius-md);
  padding: 24px;
  color: rgba(255,255,255,0.85);
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-lg);
}
.sidebar-panel h3 { color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.65);
  transition: all var(--transition);
}
.sidebar-nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.95); }
.sidebar-nav-item.active { background: rgba(245,166,35,0.18); color: var(--accent); }
.sidebar-nav-item i { width: 16px; text-align: center; }

.content-panel {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

/* ---------- 11. STATS / METRIC CARDS ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-card h3 { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.stat-card p  { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card.accent h3 { color: var(--accent-dark); }
.stat-card.success h3 { color: #16a34a; }

/* ---------- 12. PROGRESS BARS ---------- */
.progress-track {
  display: flex;
  gap: 0;
  margin: 20px 0;
  position: relative;
}
.progress-track::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 32px;
  right: 32px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.progress-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  box-shadow: 0 0 0 3px var(--border);
  transition: all var(--transition);
}
.progress-step-dot.done   { background: var(--success); color: #fff; box-shadow: 0 0 0 3px var(--success-light); }
.progress-step-dot.active { background: var(--primary); color: #fff; box-shadow: 0 0 0 3px var(--primary-xlight); }
.progress-step-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-align: center; line-height: 1.3; }
.progress-step.done .progress-step-label   { color: var(--success); }
.progress-step.active .progress-step-label { color: var(--primary); }

/* Progress bar (linear) */
.bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
}
.bar-fill.accent { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); }
.bar-fill.success { background: linear-gradient(90deg, #16a34a, var(--success)); }

/* ---------- 13. PARTICIPANT COURSE CARDS ---------- */
.enrolled-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  margin-bottom: 20px;
}
.enrolled-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.enrolled-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px 24px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.enrolled-card-header h4 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.enrolled-card-header p  { color: rgba(255,255,255,0.75); font-size: 0.8rem; }
.enrolled-card-body { padding: 20px 24px; }
.enrolled-card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Skill level pill */
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.skill-beginner     { background: var(--info-light); color: #1e40af; }
.skill-intermediate { background: var(--warning-light); color: #92400e; }
.skill-advanced     { background: var(--success-light); color: #166534; }

/* ---------- 14. COURSE VIEW TABS ---------- */
.tab-header {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
}
.tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab-btn:hover   { color: var(--primary); background: var(--primary-xlight); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab-btn.active  { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 15. MATERIAL FILE CARDS ---------- */
.material-list { display: flex; flex-direction: column; gap: 12px; }
.material-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.material-item:hover { border-color: var(--primary); background: var(--primary-xlight); box-shadow: var(--shadow-sm); }
.material-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.material-icon.pdf  { background: #fee2e2; color: #dc2626; }
.material-icon.txt  { background: var(--info-light); color: var(--info); }
.material-icon.csv  { background: var(--success-light); color: var(--success); }
.material-icon.xlsx { background: var(--success-light); color: #16a34a; }
.material-icon.pptx { background: #fde8d8; color: #c2410c; }
.material-icon.docx { background: var(--info-light); color: var(--info); }
.material-info { flex: 1; }
.material-name { font-weight: 600; font-size: 0.9rem; color: var(--text-body); }
.material-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- 16. FORMS ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-body); margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-body);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(57,49,133,0.12);
}
textarea { min-height: 120px; resize: vertical; }
select { cursor: pointer; }
.select-wrapper { position: relative; }
.select-wrapper select { padding-right: 32px; appearance: none; }
.select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* ---------- 17. QUIZ ---------- */
.quiz-container {
  max-width: 680px;
  margin: 0 auto;
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.quiz-progress-label { font-size: 0.83rem; color: var(--text-muted); font-weight: 600; }
.quiz-question-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.quiz-question-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 12px;
}
.quiz-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 24px;
  line-height: 1.5;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  background: #fff;
  text-align: left;
}
.quiz-option:hover { border-color: var(--primary); background: var(--primary-xlight); color: var(--primary); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-xlight); color: var(--primary); font-weight: 600; }
.quiz-option.correct  { border-color: var(--success); background: var(--success-light); color: #166534; }
.quiz-option.wrong    { border-color: var(--danger);  background: var(--danger-light);  color: #991b1b; }
.quiz-option-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800;
  flex-shrink: 0;
  transition: all var(--transition);
}
.quiz-option.selected .quiz-option-letter { background: var(--primary); color: #fff; }
.quiz-option.correct  .quiz-option-letter { background: var(--success); color: #fff; }
.quiz-option.wrong    .quiz-option-letter { background: var(--danger);  color: #fff; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; }

/* Pre-Quiz (Skill Assessment) Specific */
.pre-quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--primary-xlight), var(--accent-light));
  border: 1px solid var(--primary-xlight);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

/* ---------- 18. RESULT / SCORE CARD ---------- */
.result-card {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.result-score-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  margin: 0 auto 24px;
  font-size: 2rem;
  font-weight: 900;
  border: 8px solid;
}
.result-score-ring.pass { border-color: var(--success); color: var(--success); background: var(--success-light); }
.result-score-ring.fail { border-color: var(--danger);  color: var(--danger);  background: var(--danger-light); }

/* ---------- 19. TABLES ---------- */
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--primary); }
thead th {
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: var(--bg-light); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 13px 16px; font-size: 0.87rem; vertical-align: middle; color: var(--text-body); }

/* ---------- 20. MODAL ---------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.active { display: flex; animation: fadeIn 0.2s ease; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}
.modal-header {
  padding: 20px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.modal-header h3 { font-size: 1.1rem; color: var(--text-body); }
.modal-close {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
#system-modal-body { padding: 24px 28px 28px; overflow-y: auto; }

/* Login specific modal — wider */
.modal-box.modal-quiz { max-width: 740px; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- 21. GOOGLE SIGN-IN BUTTON ---------- */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  width: 100%;
  transition: all var(--transition);
}
.btn-google:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); background: var(--primary-xlight); }
.btn-google .google-icon { font-size: 1.1rem; }

/* ---------- 22. CERTIFICATE ---------- */
.certificate-preview-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}
.certificate-outer {
  width: 800px;
  max-width: 100%;
  border: 12px solid var(--primary);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(57,49,133,0.25);
  background: #fff;
}
.certificate-inner {
  border: 4px solid var(--accent);
  border-radius: 8px;
  padding: 48px 56px;
  text-align: center;
}
.cert-header h4 { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.cert-header h2 { font-size: 2rem; color: var(--primary); font-weight: 800; }
.cert-title  { font-size: 1rem; color: var(--text-muted); margin: 20px 0 8px; font-style: italic; }
.cert-recipient { font-size: 2.4rem; font-family: 'Georgia', serif; color: var(--primary-dark); margin: 12px 0; border-bottom: 2px solid var(--accent); padding-bottom: 8px; display: inline-block; }
.cert-body   { font-size: 0.95rem; color: var(--text-muted); margin: 16px 0 32px; line-height: 1.8; }
.cert-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 32px; text-align: center; }
.cert-signature-line { border-top: 1.5px solid var(--border); margin-top: 8px; padding-top: 6px; font-size: 0.78rem; color: var(--text-muted); }
.cert-seal {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.6rem; font-weight: 800;
  text-align: center;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin: 0 auto 8px;
  box-shadow: 0 4px 12px rgba(57,49,133,0.4);
  padding: 12px;
}

/* ---------- 23. LOGIN PAGE ---------- */
.login-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.login-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.login-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 36px 40px;
  text-align: center;
  color: #fff;
}
.login-header h2 { color: #fff; font-size: 1.5rem; }
.login-header p  { color: rgba(255,255,255,0.75); font-size: 0.88rem; margin-top: 4px; }
.login-body { padding: 32px 40px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.login-divider span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-footer { text-align: center; padding: 0 40px 28px; font-size: 0.82rem; color: var(--text-muted); }

/* ---------- 24. ALERT BOX ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-danger  { background: var(--danger-light);  color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: var(--warning-light); color: #78350f; border-color: #fcd34d; }
.alert-success { background: var(--success-light); color: #166534; border-color: #86efac; }
.alert-info    { background: var(--info-light);    color: #1e40af; border-color: #93c5fd; }

/* ---------- 25. FLEX UTILITIES ---------- */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.flex-gap     { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- 26. EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; margin-bottom: 16px; color: var(--border); }
.empty-state h3 { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; max-width: 360px; margin: 0 auto 20px; }

/* ---------- 27. RESTRICTION NOTICE ---------- */
.restriction-banner {
  background: linear-gradient(90deg, var(--primary-xlight), var(--accent-light));
  border: 1px solid var(--primary-xlight);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 28. ARCHIVED COURSE TAG ---------- */
.archived-row td { opacity: 0.65; }
.archived-banner {
  background: linear-gradient(90deg, #f1f0ff, #fff7ed);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 29. FOOTER ---------- */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.65);
  margin-top: auto;
}
.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
}
.footer-brand h3 { color: #fff; font-size: 1.2rem; margin-bottom: 12px; }
.footer-brand p  { font-size: 0.85rem; line-height: 1.7; }
.footer-links h4, .footer-contact h4 { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a  { color: rgba(255,255,255,0.65); font-size: 0.88rem; display: flex; align-items: center; gap: 8px; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-contact p { display: flex; gap: 10px; font-size: 0.85rem; margin-bottom: 10px; align-items: flex-start; }
.footer-contact i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  text-align: center;
  font-size: 0.78rem;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
}

/* ---------- 30. PRINT STYLES ---------- */
@media print {
  header, footer, nav, .no-print, .btn, button, .sidebar-panel { display: none !important; }
  body { background: white !important; }
  main { padding: 0 !important; }
  #app-content { max-width: none; padding: 0; }
  .certificate-outer { box-shadow: none; border: 8px solid #393185; }
}

/* ---------- 31. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar-panel { position: static; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  #app-content { padding: 20px 16px; }
  .nav-container { padding: 0 16px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr; gap: 28px; }
  .cert-footer { grid-template-columns: 1fr; }
  .progress-track::before { display: none; }
}

/* ============================================================
   HR CORPORATE DASHBOARD STYLES
   ============================================================ */

/* -- HR KPI Mega Cards -- */
.hr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.hr-kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.hr-kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hr-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.hr-kpi-card.primary::before  { background: var(--primary); }
.hr-kpi-card.accent::before   { background: var(--accent); }
.hr-kpi-card.success::before  { background: var(--success); }
.hr-kpi-card.info::before     { background: var(--info); }
.hr-kpi-card.warning::before  { background: var(--warning); }
.hr-kpi-card.danger::before   { background: var(--danger); }

.hr-kpi-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.hr-kpi-card.primary .hr-kpi-icon  { background: var(--primary-xlight); color: var(--primary); }
.hr-kpi-card.accent .hr-kpi-icon   { background: var(--accent-light);   color: var(--accent-dark); }
.hr-kpi-card.success .hr-kpi-icon  { background: var(--success-light);  color: #166534; }
.hr-kpi-card.info .hr-kpi-icon     { background: var(--info-light);     color: var(--info); }
.hr-kpi-card.warning .hr-kpi-icon  { background: var(--warning-light);  color: #92400e; }
.hr-kpi-card.danger .hr-kpi-icon   { background: var(--danger-light);   color: var(--danger); }

.hr-kpi-value {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text-body);
  letter-spacing: -0.02em;
}
.hr-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.hr-kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* -- ROI Showcase Block -- */
.roi-showcase {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #5a52b8 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.roi-showcase::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.roi-showcase::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -40px;
  width: 300px; height: 300px;
  background: rgba(245,166,35,0.08);
  border-radius: 50%;
}
.roi-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.roi-showcase-header h2 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.roi-showcase-header p  { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.roi-label {
  background: rgba(245,166,35,0.2);
  border: 1px solid rgba(245,166,35,0.4);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.roi-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 1;
}
.roi-metric {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.roi-metric-before {
  font-size: 1.4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  text-decoration: line-through;
  display: block;
  line-height: 1;
}
.roi-metric-after {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  display: block;
  line-height: 1.1;
  margin: 6px 0;
}
.roi-metric-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34,197,94,0.2);
  border: 1px solid rgba(34,197,94,0.4);
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.roi-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -- Score Improvement Bar -- */
.score-bar-wrap { margin-bottom: 14px; }
.score-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.78rem;
  font-weight: 600;
}
.score-bar-track {
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.score-bar-before {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(57,49,133,0.25);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.score-bar-after {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  transition: width 0.8s ease 0.2s;
}
.score-bar-after.pass { background: linear-gradient(90deg, #16a34a, var(--success)); }

/* -- Improvement Badge -- */
.improvement-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.improvement-positive { background: var(--success-light); color: #166534; }
.improvement-negative { background: var(--danger-light);  color: #991b1b; }
.improvement-neutral  { background: var(--bg-light);      color: var(--text-muted); border: 1px solid var(--border); }

/* -- Department Analytics Grid -- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.dept-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.dept-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.dept-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dept-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-xlight);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.dept-name { font-weight: 700; font-size: 0.92rem; color: var(--text-body); }
.dept-count { font-size: 0.75rem; color: var(--text-muted); }
.dept-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.dept-stat-item { text-align: center; }
.dept-stat-value { font-size: 1.3rem; font-weight: 800; color: var(--primary); display: block; }
.dept-stat-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }

/* -- Clickable Table Rows -- */
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--primary-xlight) !important; }
.clickable-name {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
  padding-bottom: 1px;
}
.clickable-name:hover { color: var(--primary-dark); }

/* -- HR Employee Detail Modal -- */
.employee-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  color: #fff;
}
.employee-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.employee-header h3  { color: #fff; margin-bottom: 4px; }
.employee-header p   { color: rgba(255,255,255,0.75); font-size: 0.85rem; }
.employee-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.employee-mini-stat {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}
.employee-mini-stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.employee-mini-stat span   { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }

/* -- HR Tab Header override (wider tabs) -- */
.hr-tab-header {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* Responsive HR */
@media (max-width: 900px) {
  .hr-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .roi-metrics-row { grid-template-columns: repeat(2, 1fr); }
  .dept-grid { grid-template-columns: 1fr; }
  .employee-mini-stats { grid-template-columns: repeat(2, 1fr); }
}

