/* ============================================================
   EDULEARN — Premium Learning Dashboard
   Theme:   Warm cream light-mode with violet accents
   Fonts:   Instrument Serif (display) · Plus Jakarta Sans (body)
   Layout:  Sidebar + Main (full dashboard, not a landing page)
   Built by NexKeys Agency
   ============================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #FAFAF5;
  --bg-2:       #F3F3EC;
  --bg-white:   #FFFFFF;
  --bg-sidebar: #0F172A;
  --bg-card:    #FFFFFF;

  /* Brand */
  --violet:     #7C3AED;
  --violet-dim: rgba(124,58,237,0.1);
  --violet-mid: rgba(124,58,237,0.2);
  --amber:      #F59E0B;
  --amber-dim:  rgba(245,158,11,0.12);
  --green:      #10B981;
  --green-dim:  rgba(16,185,129,0.1);
  --coral:      #F43F5E;
  --coral-dim:  rgba(244,63,94,0.1);
  --blue:       #3B82F6;
  --blue-dim:   rgba(59,130,246,0.1);

  /* Text */
  --text:       #0F172A;
  --text-2:     #475569;
  --text-3:     #94A3B8;
  --text-inv:   #FFFFFF;

  /* Sidebar text */
  --s-text:     rgba(255,255,255,0.65);
  --s-text-hv:  #FFFFFF;
  --s-border:   rgba(255,255,255,0.06);

  /* Borders */
  --border:     #E2E8F0;
  --border-hv:  #CBD5E1;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body:  'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Layout */
  --sidebar-w:  252px;
  --topbar-h:   64px;
  --r:          14px;
  --r-sm:       8px;
  --r-lg:       20px;
  --r-pill:     100px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  display: flex; min-height: 100svh;
  overflow-x: hidden;
}
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }
img { display: block; max-width: 100%; }
button { border: none; font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
h1,h2,h3 { line-height: 1.2; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hv); }

/* SR only */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: .01em; white-space: nowrap;
  transition: background .2s, box-shadow .2s, transform .2s var(--ease), border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--violet); color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}
.btn-primary:hover { background: #6D28D9; box-shadow: 0 6px 20px rgba(124,58,237,0.4); }

.btn-ghost {
  background: var(--bg-white); border: 1.5px solid var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--border-hv); color: var(--text); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ── SIDEBAR OVERLAY ─────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 499;
  background: rgba(15,23,42,0.4); backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w); z-index: 500;
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  transition: transform .35s var(--ease);
  flex-shrink: 0;
}

/* Brand */
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-size: 17px; font-weight: 700;
  color: var(--text-inv); padding: 22px 20px 18px;
  border-bottom: 1px solid var(--s-border);
  text-decoration: none;
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--violet);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.brand-name strong { color: var(--amber); }

/* Sidebar search (mobile only) */
.sidebar-search {
  display: none; align-items: center; gap: 10px;
  margin: 12px 16px; padding: 9px 12px;
  background: rgba(255,255,255,.06); border-radius: var(--r-sm);
  border: 1px solid var(--s-border);
}
.sidebar-search svg { color: var(--s-text); flex-shrink: 0; }
.sidebar-search input {
  background: none; border: none; outline: none;
  color: var(--text-inv); font-size: 13px; width: 100%;
}
.sidebar-search input::placeholder { color: var(--s-text); }

/* Nav */
.sidebar-top { flex: 1; padding-bottom: 12px; }
nav { padding: 8px 0; }
.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-3);
  padding: 16px 20px 6px; display: block;
}
.nav-list { padding: 0 10px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--s-text); font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .18s, color .18s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--s-text-hv); }
.nav-item.active { background: rgba(124,58,237,.18); color: #fff; }
.nav-item.active svg { color: var(--violet); opacity: 1; }

.nav-badge {
  margin-left: auto; padding: 2px 7px;
  background: rgba(124,58,237,.25); color: #C4B5FD;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700;
}
.nav-badge.accent { background: rgba(245,158,11,.2); color: #FDE68A; }

/* Sidebar daily goal */
.sidebar-goal {
  margin: 0 14px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--s-border);
  border-radius: var(--r-sm); padding: 14px;
}
.goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.goal-title  { font-size: 12px; font-weight: 600; color: var(--s-text); }
.goal-val    { font-size: 13px; font-weight: 700; color: var(--amber); font-family: var(--font-body); }
.goal-track  { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.goal-fill   { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--amber), #FBBF24); transition: width 1.2s var(--ease); }
.goal-note   { font-size: 11px; color: var(--text-3); line-height: 1.5; }

/* Sidebar user */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--s-border);
  flex-shrink: 0;
}
.su-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.15); flex-shrink: 0; }
.su-info   { flex: 1; min-width: 0; }
.su-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text-inv); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-info span   { font-size: 11px; color: var(--amber); font-weight: 600; }
.su-settings {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.07); border: 1px solid var(--s-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--s-text); flex-shrink: 0;
  transition: background .2s, color .2s;
}
.su-settings:hover { background: rgba(255,255,255,.13); color: var(--text-inv); }

/* ── MAIN WRAPPER ────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100svh; max-width: 100%;
}

/* ── TOP BAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 400;
  height: var(--topbar-h);
  background: rgba(250,250,245,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
}

.topbar-menu {
  display: none; flex-direction: column;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-menu span { display: block; width: 16px; height: 1.5px; background: var(--text-2); transition: all .3s var(--ease); }
.topbar-menu.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.topbar-menu.open span:nth-child(2) { opacity: 0; width: 0; }
.topbar-menu.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.topbar-search {
  flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--r-pill); padding: 9px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.topbar-search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-dim); }
.topbar-search svg { color: var(--text-3); flex-shrink: 0; }
.topbar-search input { flex: 1; border: none; background: none; outline: none; font-size: 14px; color: var(--text); min-width: 0; }
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search kbd { font-size: 11px; color: var(--text-3); background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-family: inherit; flex-shrink: 0; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--bg-white); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); position: relative;
  transition: border-color .2s, color .2s;
}
.topbar-btn:hover { border-color: var(--border-hv); color: var(--text); }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); border: 1.5px solid var(--bg); }

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--r-pill); cursor: pointer;
  position: relative;
  transition: border-color .2s;
}
.topbar-user:hover { border-color: var(--border-hv); }
.topbar-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.topbar-username { font-size: 13px; font-weight: 600; color: var(--text); }
.topbar-user svg { color: var(--text-3); }

/* User dropdown */
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; background: var(--bg-white);
  border: 1.5px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); z-index: 500; overflow: hidden;
  animation: fadeDown .2s var(--ease);
}
.topbar-user:focus-within .user-dropdown,
.topbar-user.open .user-dropdown { display: block; }
@keyframes fadeDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:none} }

.ud-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.ud-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ud-header strong { display: block; font-size: 13px; font-weight: 600; }
.ud-header span   { font-size: 12px; color: var(--text-3); }
.user-dropdown ul li a {
  display: block; padding: 10px 16px;
  font-size: 14px; color: var(--text-2);
  transition: background .15s, color .15s;
}
.user-dropdown ul li a:hover { background: var(--bg-2); color: var(--text); }
.user-dropdown .ud-sep { height: 1px; background: var(--border); margin: 4px 0; }
.user-dropdown .ud-logout { color: var(--coral) !important; }

/* ── DASHBOARD ───────────────────────────────────────────── */
.dashboard { flex: 1; padding: 28px 28px 0; display: flex; flex-direction: column; gap: 28px; }

/* ── GREETING SECTION ────────────────────────────────────── */
.greeting-section {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: center;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.greeting-section::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--violet-dim), transparent 70%);
  pointer-events: none;
}
.greeting-eyebrow {
  font-size: 13px; font-weight: 600;
  color: var(--violet); text-transform: uppercase;
  letter-spacing: .1em; margin-bottom: 8px;
}
.greeting-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  color: var(--text); margin-bottom: 10px; line-height: 1.15;
}
.greeting-title em { font-style: italic; color: var(--violet); }
.greeting-sub { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.greeting-sub strong { color: var(--text); }
.greeting-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.greeting-right { display: flex; align-items: center; gap: 20px; }

/* Streak ring */
.streak-card { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.streak-ring { position: relative; width: 80px; height: 80px; }
.streak-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: var(--bg-2); stroke-width: 6; }
.ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.streak-ring-fill { stroke: var(--amber); }
.streak-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.streak-num   { font-family: var(--font-body); font-size: 20px; font-weight: 800; color: var(--text); line-height: 1; }
.streak-label { font-size: 9px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }
.streak-title { font-size: 11px; font-weight: 600; color: var(--text-2); }

.mini-stat-stack { display: flex; flex-direction: column; gap: 8px; }
.mini-stat {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  min-width: 96px;
}
.ms-val   { font-family: var(--font-body); font-size: 17px; font-weight: 800; color: var(--text); }
.ms-label { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ── STATS ROW ───────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 16px;
}
.stat-tile {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .25s var(--ease);
}
.stat-tile:hover { border-color: var(--border-hv); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.st-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.st-icon-violet { background: var(--violet-dim); color: var(--violet); }
.st-icon-amber  { background: var(--amber-dim);  color: var(--amber); }
.st-icon-green  { background: var(--green-dim);  color: var(--green); }
.st-icon-coral  { background: var(--coral-dim);  color: var(--coral); }

.st-body { flex: 1; }
.st-val  { font-size: 28px; font-weight: 800; color: var(--text); font-family: var(--font-body); line-height: 1; }
.st-label { font-size: 12px; color: var(--text-3); margin-top: 4px; font-weight: 500; }
.st-trend { font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-dim); padding: 3px 8px; border-radius: var(--r-pill); align-self: flex-start; }

/* ── COURSES SECTION ─────────────────────────────────────── */
.courses-section { display: flex; flex-direction: column; gap: 20px; }

.courses-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.courses-title { font-family: var(--font-serif); font-size: 26px; font-weight: 400; color: var(--text); }
.courses-sub   { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.courses-actions { display: flex; align-items: center; gap: 10px; }

/* View toggle */
.view-toggle { display: flex; background: var(--bg-2); border: 1.5px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.vt-btn { width: 34px; height: 32px; display: flex; align-items: center; justify-content: center; background: none; color: var(--text-3); transition: background .2s, color .2s; }
.vt-btn.active { background: var(--bg-white); color: var(--violet); box-shadow: var(--shadow-sm); }

/* Category tabs */
.category-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 5px;
}
.cat-tab {
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: none; transition: all .2s;
}
.cat-tab:hover  { background: var(--bg-white); color: var(--text); }
.cat-tab.active { background: var(--bg-white); color: var(--violet); box-shadow: var(--shadow-sm); }

/* ── COURSE GRID ─────────────────────────────────────────── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.course-grid.list-mode { grid-template-columns: 1fr; }
.course-grid.list-mode .course-card { flex-direction: row; padding: 16px 20px; gap: 16px; align-items: center; }
.course-grid.list-mode .cc-top { margin-bottom: 0; flex-direction: column; gap: 8px; }
.course-grid.list-mode .cc-title { font-size: 15px; margin-bottom: 0; }
.course-grid.list-mode .cc-progress-wrap { margin-top: 0; flex: 1; }
.course-grid.list-mode .cc-progress-ring { display: none; }
.course-grid.list-mode .cc-progress-info { flex: 1; }
.course-grid.list-mode .cc-cta { align-self: center; flex-shrink: 0; }

.course-card {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 20px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s, box-shadow .3s var(--ease), transform .3s var(--ease);
  position: relative; overflow: hidden;
}
.course-card:hover { border-color: var(--border-hv); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.course-card:focus { outline: 2px solid var(--violet); outline-offset: 2px; }

.course-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--ic,var(--violet)), transparent);
  opacity: 0; transition: opacity .3s;
}
.course-card:hover::after { opacity: 1; }

.hidden-card { display: none; }
.hidden-card.visible { display: flex; }

.cc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.cc-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--ib); border: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--ic); flex-shrink: 0;
}
.cc-bookmark {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: background .2s, color .2s, border-color .2s;
}
.cc-bookmark:hover, .cc-bookmark.bookmarked { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,.3); }

.cc-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.cc-meta  { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.cc-tags  { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.cc-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(var(--tc-rgb,124,58,237),.08);
  color: var(--tc);
  border: 1px solid rgba(var(--tc-rgb,124,58,237),.15);
}

/* SVG Circular progress ring */
.cc-progress-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cc-progress-ring { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.prog-svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.prog-bg   { fill: none; stroke: var(--bg-2); stroke-width: 4; }
.prog-fill {
  fill: none; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 106.81; /* 2π × 17 */
  stroke-dashoffset: calc(106.81 * (1 - var(--prog, 0) / 100));
  transition: stroke-dashoffset 1.2s var(--ease);
}
.prog-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  color: var(--text);
}

.cc-progress-info { flex: 1; min-width: 0; }
.prog-bar-label { font-size: 11px; color: var(--text-3); display: block; margin-bottom: 5px; font-weight: 500; }
.prog-bar-track  { height: 5px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.prog-bar-fill   { height: 100%; border-radius: 3px; transition: width 1.2s var(--ease); }

.cc-cta {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--violet);
  padding: 8px 0 0;
  transition: gap .2s;
}
.cc-cta:hover { gap: 4px; }

/* No results & Load more */
.no-results {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px; color: var(--text-3); text-align: center;
  background: var(--bg-white); border: 1.5px dashed var(--border);
  border-radius: var(--r-lg);
}
.no-results[hidden] { display: none; }

.load-more-wrap { display: flex; justify-content: center; padding: 8px 0; }
.load-more-btn {
  min-width: 200px; justify-content: center;
}

/* ── ACTIVITY SECTION ────────────────────────────────────── */
.activity-section {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-sm); margin-bottom: 28px;
}
.activity-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.activity-title { font-family: var(--font-serif); font-size: 22px; font-weight: 400; }
.activity-sub   { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.activity-total { text-align: right; }
.at-val   { display: block; font-size: 28px; font-weight: 800; color: var(--violet); }
.at-label { font-size: 12px; color: var(--text-3); }

.activity-chart { padding: 8px 0; }
.ac-bars {
  display: flex; align-items: flex-end;
  gap: 12px; height: 100px;
}
.ac-bar-group {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; flex: 1;
}
.ac-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  height: var(--h);
  background: var(--bg-2);
  transition: height .8s var(--ease), background .3s;
  min-height: 6px;
  cursor: default;
}
.ac-bar-group .ac-bar { background: var(--violet-dim); }
.ac-bar-group.active .ac-bar { background: var(--violet); }
.ac-bar-group:hover .ac-bar  { background: rgba(124,58,237,.3); }
.ac-day { font-size: 11px; font-weight: 600; color: var(--text-3); }
.ac-bar-group.active .ac-day { color: var(--violet); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-3);
}
.nk-link { color: var(--violet); font-weight: 600; transition: opacity .2s; }
.nk-link:hover { opacity: .75; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* ≤ 1200px: grid tightens */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .greeting-right { display: none; }
}

/* ≤ 900px: sidebar collapses */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 24px 0 60px rgba(0,0,0,.25);
  }
  .sidebar-search { display: flex; }
  .main-wrapper   { margin-left: 0; }
  .topbar-menu    { display: flex; }
  .topbar-search  { max-width: 100%; }
  .topbar-search kbd { display: none; }
  .dashboard      { padding: 20px 16px 0; }
  .greeting-section { padding: 24px 20px; }
  .activity-section { padding: 20px; margin-bottom: 20px; }
  .site-footer    { padding: 16px 20px; }
}

/* ≤ 640px */
@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-username { display: none; }
  .courses-header { flex-direction: column; }
  .category-tabs  { display: none; }
  .greeting-title { font-size: 26px; }
  .greeting-actions { flex-direction: column; }
  .greeting-actions .btn { width: 100%; justify-content: center; }
  .course-grid { grid-template-columns: 1fr; }
  .ac-bars { gap: 6px; }
}

/* Print */
@media print {
  .sidebar, .topbar-menu, .cc-bookmark { display: none; }
  .main-wrapper { margin-left: 0; }
  .dashboard { padding: 20px; }
}