.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}

.user-badge:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.user-badge svg {
  width: 14px;
  height: 14px;
}/* ============================================================
   EDUVILLE 2.0 — COMPONENTS.CSS
   Buttons, cards, forms, tags, badges, and UI primitives
   ============================================================ */

/* ============================================================
   1. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

.btn:hover { text-decoration: none; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Sizes */
.btn-xs { padding: 0.35rem 0.75rem; font-size: var(--fs-xs); }
.btn-sm { padding: 0.5rem 1rem; font-size: var(--fs-sm); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: var(--fs-base); }

/* Primary — Green (GitHub-style) */
.btn-primary,
.btn-gold {
  background-color: var(--accent-green);
  color: #fff;
  border-color: rgba(240, 246, 252, 0.1);
}
.btn-primary:hover,
.btn-gold:hover {
  background-color: var(--accent-green-h);
  color: #fff;
  text-decoration: none;
}

/* Secondary — Outline */
.btn-secondary,
.btn-outline-blue {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover,
.btn-outline-blue:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

/* Gold — for brand CTAs */
.btn-gold-brand {
  background-color: var(--gold);
  color: var(--edu-blue-dark);
  border-color: var(--gold-dark);
}
.btn-gold-brand:hover {
  background-color: var(--gold-dark);
  color: var(--edu-blue-dark);
  text-decoration: none;
}

/* Danger — Delete/Remove */
.btn-danger {
  background-color: transparent;
  color: var(--accent-red);
  border-color: var(--accent-red);
}
.btn-danger:hover {
  background-color: var(--accent-red);
  color: #fff;
  text-decoration: none;
}

/* Ghost — Minimal */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-bright);
  text-decoration: none;
}

/* Full-width variant */
.btn-block {
  width: 100%;
  display: flex;
}

/* ============================================================
   2. CARDS
   ============================================================ */

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  transition: all var(--dur-base) var(--ease);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.card-title {
  color: var(--text-bright);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin: 0;
}

.card-body {
  color: var(--text-primary);
}

.card-footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Interactive card */
.card-hover:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Course/Repo style card */
.repo-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: all var(--dur-base) var(--ease);
}

.repo-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.repo-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.repo-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: var(--bg-tertiary);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.repo-title {
  color: var(--edu-blue-light);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin: 0;
  flex: 1;
}

.repo-desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  flex: 1;
}

.repo-footer {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: auto;
  padding-top: var(--sp-3);
}

/* ============================================================
   3. TAGS & BADGES
   ============================================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.2rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  border-radius: var(--r-full);
  border: 1px solid var(--border-default);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  white-space: nowrap;
}

.tag-zimsec {
  background-color: var(--tag-blue-bg);
  color: var(--tag-blue-text);
  border-color: transparent;
}

.tag-cambridge {
  background-color: var(--tag-purple-bg);
  color: var(--tag-purple-text);
  border-color: transparent;
}

.tag-bec {
  background-color: var(--tag-green-bg);
  color: var(--tag-green-text);
  border-color: transparent;
}

.tag-gold {
  background-color: var(--gold);
  color: var(--edu-blue-dark);
  border-color: var(--gold-dark);
}

.tag-coming-soon {
  background-color: var(--tag-orange-bg);
  color: var(--tag-orange-text);
  border-color: transparent;
}

.tag-success {
  background-color: var(--tag-green-bg);
  color: var(--tag-green-text);
  border-color: transparent;
}

/* Alias for GitHub-style "badge" */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.2rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  border-radius: var(--r-full);
  border: 1px solid var(--border-default);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.badge-zimsec { background-color: var(--tag-blue-bg); color: var(--tag-blue-text); border-color: transparent; }
.badge-cambridge { background-color: var(--tag-purple-bg); color: var(--tag-purple-text); border-color: transparent; }
.badge-bec { background-color: var(--tag-green-bg); color: var(--tag-green-text); border-color: transparent; }
.badge-gold { background-color: var(--gold); color: var(--edu-blue-dark); }
.badge-coming-soon { background-color: var(--tag-orange-bg); color: var(--tag-orange-text); border-color: transparent; }

/* ============================================================
   4. FORMS
   ============================================================ */

.form-group {
  margin-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.form-label,
label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--edu-blue-light);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
  background-color: var(--bg-secondary);
}

.form-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--lh-normal);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3e%3cpath d='M8 11L3 6h10z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  font-style: italic;
  margin-top: var(--sp-1);
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--accent-red);
  margin-top: var(--sp-1);
}

/* Checkbox / Radio */
.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: var(--fs-sm);
}

.form-checkbox input,
.form-radio input {
  width: auto;
  accent-color: var(--accent-green);
}

/* ============================================================
   5. TABS
   ============================================================ */

.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border-default);
  overflow-x: auto;
  margin-bottom: var(--sp-5);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover {
  color: var(--text-bright);
}

.tab.active {
  color: var(--text-bright);
  border-bottom-color: var(--gold);
}

/* ============================================================
   6. AVATAR
   ============================================================ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border-default);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--fs-base); }
.avatar-lg { width: 80px; height: 80px; font-size: var(--fs-3xl); }
.avatar-xl { width: 120px; height: 120px; font-size: var(--fs-4xl); }

/* ============================================================
   7. PROGRESS BAR
   ============================================================ */

.progress {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-green-h));
  border-radius: var(--r-full);
  transition: width var(--dur-slow) var(--ease);
}

.progress-fill.gold {
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}

/* ============================================================
   8. ALERTS
   ============================================================ */

.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
  background-color: var(--bg-secondary);
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  margin-bottom: var(--sp-4);
}

.alert-success {
  background-color: rgba(35, 134, 54, 0.15);
  border-color: var(--accent-green);
  color: #7ee787;
}

.alert-error {
  background-color: rgba(218, 54, 51, 0.15);
  border-color: var(--accent-red);
  color: #ff7b72;
}

.alert-warning {
  background-color: rgba(210, 153, 34, 0.15);
  border-color: var(--accent-yellow);
  color: #e3b341;
}

.alert-info {
  background-color: rgba(88, 166, 255, 0.15);
  border-color: var(--edu-blue-light);
  color: var(--edu-blue-light);
}

/* ============================================================
   9. SECTION HEADERS
   ============================================================ */

.section-heading {
  color: var(--text-bright);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.section-heading-row .section-heading {
  margin-bottom: 0;
}

/* ============================================================
   10. DIVIDER
   ============================================================ */

.divider {
  height: 1px;
  background-color: var(--border-default);
  margin: var(--sp-6) 0;
  border: none;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background-color: var(--border-default);
}

/* ============================================================
   11. LOADING STATES
   ============================================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ============================================================
   12. EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  opacity: 0.6;
}

.empty-state h3 {
  color: var(--text-bright);
  margin-bottom: var(--sp-2);
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto var(--sp-4);
}

/* ============================================================
   13. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .card { padding: var(--sp-4); }
  .repo-card { padding: var(--sp-4); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
/* ============================================================
   LUCIDE ICONS
   ============================================================ */

.icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
}

.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* Icons in buttons */
.btn .icon {
  width: 15px;
  height: 15px;
}

/* Icons in nav links */
.nav-links a .icon {
  width: 15px;
  height: 15px;
}

/* Icons in sidebar links */
.side-link .icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
}

.side-link:hover .icon,
.side-link.active .icon {
  color: var(--gold);
}

/* Icons in section headings */
.section-heading .icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

/* Icons inside search */
.search-wrap .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

.font-head { font-family: var(--font-head); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

/* Heading sizes (in case you need inline) */
.text-h1 { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.text-h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 4vw, 1.875rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.25; }
.text-h3 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.text-h4 { font-family: var(--font-head); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}

.user-badge:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.user-badge svg {
  width: 14px;
  height: 14px;
}