/* ═══════════════════════════════════════════
   NexUday LMS — Shared Design System
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy:        #0B1C2D;
  --steel:       #1A3A52;
  --steel-light: #24506E;
  --copper:      #C97D3A;
  --copper-light:#E8A05A;
  --amber:       #F5B942;
  --cream:       #F7F2EA;
  --cream-dark:  #EDE8DF;
  --white:       #FFFFFF;
  --text-main:   #0B1C2D;
  --text-muted:  #4A6478;
  --text-faint:  #8FA8BE;
  --border:      rgba(11,28,45,0.10);
  --border-dark: rgba(11,28,45,0.18);
  --success:     #2E7D52;
  --success-bg:  #EBF5EF;
  --warning:     #B45309;
  --warning-bg:  #FEF3C7;
  --sidebar-w:   260px;
  --topbar-h:    68px;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow-sm:   0 2px 8px rgba(11,28,45,0.07);
  --shadow-md:   0 6px 24px rgba(11,28,45,0.10);
  --shadow-lg:   0 16px 48px rgba(11,28,45,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-main);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: 'Playfair Display', serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── UTILITY ── */
.mono { font-family: 'DM Mono', monospace; }
.copper { color: var(--copper); }
.muted  { color: var(--text-muted); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
}
.badge-copper { background: rgba(201,125,58,0.12); color: var(--copper); }
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-amber  { background: var(--warning-bg); color: var(--warning); }
.badge-navy   { background: rgba(11,28,45,0.08); color: var(--navy); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--copper), var(--amber));
  color: white;
  box-shadow: 0 4px 16px rgba(201,125,58,0.35);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(201,125,58,0.45); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-dark);
  color: var(--text-main);
}
.btn-outline:hover { border-color: var(--copper); color: var(--copper); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--cream-dark); color: var(--navy); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ── CARD ── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-main); margin-bottom: 7px;
  letter-spacing: 0.2px;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-dark);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(201,125,58,0.12);
}
.form-input::placeholder { color: var(--text-faint); }

/* ── PROGRESS BAR ── */
.progress-track {
  height: 6px; background: var(--cream-dark);
  border-radius: 100px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--amber));
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* ── LMS SIDEBAR LAYOUT ── */
.lms-layout {
  display: flex; min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 50;
  display: flex; flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s;
}
.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 12px;
}
.logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--copper), var(--amber));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 18px; color: white;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 700; color: white;
}
.logo-text span { color: var(--copper-light); }

.sidebar-user {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 12px;
}
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--steel), var(--steel-light));
  border: 2px solid rgba(201,125,58,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: white; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 1px; }

.sidebar-nav {
  flex: 1; padding: 16px 12px;
}
.nav-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 9px;
  color: rgba(255,255,255,0.55);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.nav-item.active {
  background: rgba(201,125,58,0.15);
  color: var(--copper-light);
  border: 1px solid rgba(201,125,58,0.2);
}
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--copper);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 100px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── MAIN CONTENT AREA ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  transition: background 0.15s;
  position: relative;
  touch-action: manipulation; /* eliminates 300ms tap delay on mobile */
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--cream-dark); }
.icon-btn .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--copper); border-radius: 50%;
  border: 1.5px solid white;
}

.page-body { padding: 32px; flex: 1; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.6; transform:scale(1.3); }
}
.anim-fade-up { animation: fadeUp 0.5s ease both; }
.anim-fade-in { animation: fadeIn 0.4s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-body { padding: 20px 16px; }
  .topbar { padding: 0 20px; }
}

/* ═══════════════════════════════════════════
   PLAN BADGES
   ═══════════════════════════════════════════ */
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
}
.plan-free {
  background: rgba(11,28,45,0.07);
  color: var(--text-muted);
}
.plan-pro {
  background: linear-gradient(135deg, rgba(201,125,58,0.15), rgba(245,185,66,0.15));
  color: var(--copper);
  border: 1px solid rgba(201,125,58,0.25);
}
.plan-enterprise {
  background: linear-gradient(135deg, rgba(11,28,45,0.12), rgba(26,58,82,0.12));
  color: var(--navy);
  border: 1px solid rgba(11,28,45,0.18);
}

/* ── QUECI BRAND BADGE ── */
.queci-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 100px;
  background: var(--navy);
  color: var(--amber);
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase;
}
.queci-badge::before {
  content: '◆';
  font-size: 8px;
  color: var(--copper-light);
}

/* ── GATING LOCK BADGE (Pro-only content) ── */
.lock-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  background: rgba(201,125,58,0.10);
  color: var(--copper);
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(201,125,58,0.20);
}

/* ═══════════════════════════════════════════
   NOTIFICATION PANEL
   ═══════════════════════════════════════════ */
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: fadeUp 0.2s ease both;
}
.notif-panel.open { display: block; }

.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.notif-header h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--navy);
}
.notif-mark-all {
  font-size: 12px; color: var(--copper); cursor: pointer;
  background: none; border: none; font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: var(--cream); }
.notif-item.unread { background: rgba(201,125,58,0.04); }
.notif-item.unread::before {
  content: '';
  position: absolute; left: 0;
  width: 3px; height: 100%;
  background: var(--copper);
  border-radius: 0 3px 3px 0;
}
.notif-item { position: relative; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; color: var(--text-main); line-height: 1.45; }
.notif-text strong { font-weight: 600; }
.notif-time { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

.notif-empty {
  padding: 32px 20px; text-align: center;
  color: var(--text-faint); font-size: 13px;
}

/* ═══════════════════════════════════════════
   SEARCH OVERLAY
   ═══════════════════════════════════════════ */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(11,28,45,0.55);
  z-index: 300;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  animation: fadeIn 0.2s ease both;
}
.search-overlay.open { display: flex; }

.search-box {
  width: 640px; max-width: calc(100vw - 40px);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp 0.25s ease both;
}
.search-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.search-icon { font-size: 20px; color: var(--text-faint); }
.search-input {
  flex: 1; border: none; outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; color: var(--text-main);
  background: transparent;
}
.search-input::placeholder { color: var(--text-faint); }
.search-close-btn {
  font-size: 12px; color: var(--text-muted);
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 9px; cursor: pointer;
  font-family: 'DM Mono', monospace;
}
.search-results { max-height: 420px; overflow-y: auto; }
.search-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-faint);
  padding: 14px 20px 6px;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none; color: var(--text-main);
}
.search-result-item:hover { background: var(--cream); }
.search-result-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.search-result-name { font-size: 14px; font-weight: 500; }
.search-result-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.search-no-results {
  padding: 32px 20px; text-align: center;
  color: var(--text-faint); font-size: 14px;
}

/* ═══════════════════════════════════════════
   MODAL (generic)
   ═══════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11,28,45,0.55);
  z-index: 400;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease both;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  animation: fadeUp 0.25s ease both;
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 700px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
}
.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--navy);
}
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--cream); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; color: var(--text-muted);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--cream-dark); color: var(--navy); }
.modal-body { padding: 20px 28px; }
.modal-footer {
  padding: 0 28px 24px;
  display: flex; gap: 12px; justify-content: flex-end;
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 500;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: white;
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  border-left: 3.5px solid var(--copper);
  min-width: 260px; max-width: 360px;
  pointer-events: all;
  animation: slideInRight 0.3s ease both;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.hiding { opacity: 0; transform: translateX(20px); }
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: #DC2626; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg { font-size: 13px; font-weight: 500; color: var(--text-main); flex: 1; }
.toast-dismiss {
  font-size: 16px; color: var(--text-faint);
  background: none; border: none; cursor: pointer;
  padding: 0; line-height: 1;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════
   PROFILE DROPDOWN
   ═══════════════════════════════════════════ */
.profile-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 10px;
  background: transparent; border: none;
  cursor: pointer; transition: background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.profile-btn:hover { background: var(--cream-dark); }
.profile-btn .user-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--steel), var(--steel-light));
  border: 2px solid rgba(201,125,58,0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.profile-btn .profile-name {
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.profile-btn .profile-chevron {
  font-size: 12px; color: var(--text-faint);
  transition: transform 0.2s;
}
.profile-btn.open .profile-chevron { transform: rotate(180deg); }

.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 200; display: none;
  animation: fadeUp 0.2s ease both;
  overflow: hidden;
}
.profile-menu.open { display: block; }
.profile-menu-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-menu-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.profile-menu-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13px; color: var(--text-main);
  cursor: pointer; transition: background 0.15s;
  text-decoration: none;
}
.profile-menu-item:hover { background: var(--cream); }
.profile-menu-item .menu-icon { font-size: 16px; color: var(--text-muted); width: 18px; }
.profile-menu-item.danger { color: #DC2626; }
.profile-menu-item.danger .menu-icon { color: #DC2626; }
.profile-menu-divider {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* ═══════════════════════════════════════════
   COURSE CARD
   ═══════════════════════════════════════════ */
.course-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.course-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.course-card-thumb .thumb-icon {
  font-size: 48px; opacity: 0.3;
}
.course-card-thumb .thumb-label {
  position: absolute; top: 12px; left: 12px;
}
.course-card-thumb .thumb-lock {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(245,185,66,0.9);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.course-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.course-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700; color: var(--navy);
  line-height: 1.35; margin-bottom: 8px;
}
.course-card-meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 14px; margin-bottom: 14px;
}
.course-card-meta span { display: flex; align-items: center; gap: 5px; }
.course-card-footer {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Course grid ── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ═══════════════════════════════════════════
   STAT / METRIC CARDS
   ═══════════════════════════════════════════ */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: flex; align-items: flex-start; gap: 16px;
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(201,125,58,0.12), rgba(245,185,66,0.12));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-body {}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--navy);
  line-height: 1;
}
.stat-label {
  font-size: 12px; color: var(--text-muted); margin-top: 5px;
}
.stat-delta {
  font-size: 12px; font-weight: 600;
  margin-top: 4px;
}
.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: #DC2626; }

/* ═══════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════ */
.nx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-table th {
  text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1.5px solid var(--border-dark);
  background: var(--cream);
}
.nx-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
.nx-table tr:last-child td { border-bottom: none; }
.nx-table tbody tr:hover td { background: rgba(247,242,234,0.6); }
.nx-table-wrap {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .empty-icon {
  font-size: 48px; margin-bottom: 16px; opacity: 0.4;
}
.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--navy); margin-bottom: 8px;
}
.empty-state p { font-size: 14px; color: var(--text-muted); max-width: 340px; margin: 0 auto 24px; }

/* ═══════════════════════════════════════════
   SIDEBAR OVERLAY (mobile)
   ═══════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,28,45,0.45);
  z-index: 49;
}
@media (max-width: 900px) {
  .sidebar-overlay.open { display: block; }
  .notif-panel { width: calc(100vw - 40px); right: -10px; }
  .course-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100%; margin: 0 12px; }
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}

/* ═══════════════════════════════════════════
   INNER-PAGE LAYOUT ALIASES
   Used by profile, assessments, certificates,
   live-sessions, discussions, resources,
   peer-network, mentor, admin pages.
   ═══════════════════════════════════════════ */

/* --card is used on dark-background inner pages */
:root { --card: rgba(255,255,255,0.04); }

/* Layout wrappers — aliases for .main-content / .page-body */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.page-content {
  padding: 28px 32px;
  flex: 1;
}

/* Standard page header used across inner pages */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 800; color: white;
  line-height: 1.15; margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13.5px; color: rgba(255,255,255,0.45); line-height: 1.5;
}

/* Small topbar avatar (used in inner pages via JS injection) */
.user-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--steel), var(--steel-light));
  border: 2px solid rgba(201,125,58,0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}

/* Plan badge used in sidebar footer */
.sidebar-plan-badge {
  display: block; text-align: center;
  border-radius: 9px; padding: 9px 12px;
  font-size: 12px; font-weight: 600;
  text-decoration: none; transition: opacity .15s;
}
.sidebar-plan-badge.pro {
  background: rgba(201,125,58,0.18); color: var(--copper-light);
  border: 1px solid rgba(201,125,58,0.25);
}
.sidebar-plan-badge.free {
  background: rgba(245,185,66,0.12); color: var(--amber);
  border: 1px solid rgba(245,185,66,0.2);
}
.sidebar-plan-badge.free:hover { opacity: 0.8; }

/* Responsive for inner pages */
@media (max-width: 900px) {
  .main-wrap { margin-left: 0; }
  .page-content { padding: 20px 16px; }
}

/* ═══════════════════════════════════════════
   DARK-BODY THEME
   Applied to inner LMS pages (profile,
   assessments, certificates, live-sessions,
   discussions, resources, peer-network,
   mentor, admin) via <body class="dark-body">
   ═══════════════════════════════════════════ */
body.dark-body {
  background: #0B1C2D;
  color: white;
  /* Override CSS variables for dark context */
  --card:   rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.09);
}
/* Topbar — dark version */
body.dark-body .topbar {
  background: #0F2032;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: none;
}
body.dark-body .topbar-title,
body.dark-body #topbar-name { color: white !important; }
body.dark-body .icon-btn {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
body.dark-body .icon-btn:hover {
  background: rgba(201,125,58,0.15);
  border-color: rgba(201,125,58,0.3);
}
body.dark-body .profile-btn { color: white; }
body.dark-body .profile-btn .profile-name { color: white; }
body.dark-body .profile-chevron { color: rgba(255,255,255,0.4) !important; }
body.dark-body .notif-dot { border-color: #0F2032; }
/* Progress track on dark pages */
body.dark-body .progress-track {
  background: rgba(255,255,255,0.1);
}

/* badge-queci / badge-pro used on inner pages */
.badge-queci {
  background: rgba(201,125,58,0.15); color: var(--copper-light);
  border: 1px solid rgba(201,125,58,0.25);
}
.badge-pro {
  background: linear-gradient(135deg,rgba(201,125,58,0.2),rgba(245,185,66,0.15));
  color: var(--amber); border: 1px solid rgba(245,185,66,0.2);
}
