/* === QF BTEC IT - Components CSS === */

/* === Glass Card === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* === Page Header Banner === */
.page-banner {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--navbar-h) + 3rem) 2rem 3rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(212,175,55,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(0,206,209,0.04) 0%, transparent 60%);
}

.page-banner-content { position: relative; z-index: 1; }

.page-banner h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.8rem;
}

.page-banner p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === Tabs === */
.tabs-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Noto Naskh Arabic', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  border-color: var(--gold);
  font-weight: 800;
}

/* === General Files Section === */
.general-files-section {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.general-files-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.general-files-section h2 {
  margin-bottom: 0.5rem;
}

.general-files-section p {
  margin-bottom: 1.5rem;
}

/* === File Cards === */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.file-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.file-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.3);
  box-shadow: var(--shadow);
}

.file-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.file-icon.book { background: rgba(212,175,55,0.1); color: var(--gold); }
.file-icon.spec { background: rgba(0,206,209,0.1); color: var(--teal); }
.file-icon.task { background: rgba(168,85,247,0.1); color: #a855f7; }
.file-icon.explain { background: rgba(16,185,129,0.1); color: #10b981; }

.file-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.file-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.file-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.badge-grade10 { background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid rgba(212,175,55,0.2); }
.badge-grade11 { background: rgba(0,206,209,0.1); color: var(--teal); border: 1px solid rgba(0,206,209,0.2); }
.badge-grade12 { background: rgba(168,85,247,0.1); color: #a855f7; border: 1px solid rgba(168,85,247,0.2); }
.badge-general { background: rgba(255,255,255,0.1); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.2); }
.badge-book { background: rgba(212,175,55,0.1); color: var(--gold); }
.badge-spec { background: rgba(0,206,209,0.1); color: var(--teal); }
.badge-task { background: rgba(168,85,247,0.1); color: #a855f7; }
.badge-explain { background: rgba(16,185,129,0.1); color: #10b981; }

.file-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  width: 100%;
  justify-content: center;
  font-family: 'Noto Naskh Arabic', sans-serif;
}

.file-download-btn:hover {
  background: rgba(212,175,55,0.1);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* === Course Cards === */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(212,175,55,0.3);
}

.course-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.course-card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.course-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.course-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: 'Noto Naskh Arabic', sans-serif;
}

.course-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(212,175,55,0.4);
  color: #000;
}

/* === Groups List === */
.groups-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.group-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: var(--transition);
}

.group-card:hover {
  border-color: rgba(37,211,102,0.3);
  transform: translateX(-4px);
}

.group-platform-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.group-platform-icon.wa { background: rgba(37,211,102,0.15); color: var(--wa-green); }
.group-platform-icon.ig { background: rgba(225,48,108,0.15); color: var(--ig-pink); }
.group-platform-icon.fb { background: rgba(24,119,242,0.15); color: var(--fb-blue); }

.group-info { flex: 1; }

.group-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.group-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.group-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}

.group-join-btn.wa { background: rgba(37,211,102,0.1); color: var(--wa-green); border: 1px solid rgba(37,211,102,0.3); }
.group-join-btn.ig { background: rgba(225,48,108,0.1); color: var(--ig-pink); border: 1px solid rgba(225,48,108,0.3); }
.group-join-btn.fb { background: rgba(24,119,242,0.1); color: var(--fb-blue); border: 1px solid rgba(24,119,242,0.3); }

.group-join-btn:hover { transform: scale(1.05); }

/* === Designer Cards === */
.designers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}

.designer-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.designer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(0,206,209,0.05));
  border-bottom: 1px solid var(--glass-border);
}

.designer-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(212,175,55,0.3);
}

.designer-cover { height: 100px; position: relative; }

.designer-avatar-wrap {
  position: absolute;
  top: 60px;
  right: 1.5rem;
  z-index: 1;
}

.designer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}

.designer-body {
  padding: 3rem 1.5rem 1.5rem;
}

.designer-body h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.designer-specialty {
  font-size: 0.82rem;
  color: var(--teal);
  background: rgba(0,206,209,0.1);
  border: 1px solid rgba(0,206,209,0.2);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.designer-level {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

.designer-bio {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.designer-interests {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.interest-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.designer-contacts {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.contact-btn:hover { transform: translateY(-2px); }
.contact-btn.wa:hover { background: rgba(37,211,102,0.1); color: var(--wa-green); border-color: var(--wa-green); }
.contact-btn.ig:hover { background: rgba(225,48,108,0.1); color: var(--ig-pink); border-color: var(--ig-pink); }
.contact-btn.sn:hover { background: rgba(255,252,0,0.1); color: var(--snap-yellow); border-color: var(--snap-yellow); }
.contact-btn.web:hover { background: rgba(212,175,55,0.1); color: var(--gold); border-color: var(--gold); }
.contact-btn.mail:hover { background: rgba(234,67,53,0.1); color: var(--email-red); border-color: var(--email-red); }
.contact-btn.dc:hover { background: rgba(88,101,242,0.1); color: var(--discord-blurple); border-color: var(--discord-blurple); }
.contact-btn.li:hover { background: rgba(0,119,181,0.1); color: var(--linkedin-blue); border-color: var(--linkedin-blue); }

/* === Comments Section === */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.comment-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  transition: var(--transition);
}

.comment-card:hover { border-color: rgba(212,175,55,0.2); }

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.comment-meta { flex: 1; }

.comment-author {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-grade-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.comment-delete-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Naskh Arabic', sans-serif;
}

.comment-delete-btn:hover { background: rgba(239,68,68,0.15); }

.comment-input-area {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.comment-input-area textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  font-family: 'Noto Naskh Arabic', sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: var(--transition);
  direction: rtl;
  margin-bottom: 0.8rem;
}

.comment-input-area textarea:focus { border-color: var(--gold); }

/* === Top Students Page === */
.top-grade-section {
  margin-bottom: 3rem;
}

.top-grade-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--glass-border);
}

.top-grade-title i { color: var(--gold); font-size: 1.2rem; }

.top-students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.top-student-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.top-student-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.top-student-card.grade-d-card { border-color: rgba(212,175,55,0.3); }
.top-student-card.grade-m-card { border-color: rgba(192,192,192,0.3); }
.top-student-card.grade-p-card { border-color: rgba(176,141,87,0.3); }

.student-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

/* === Dashboard === */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - var(--navbar-h));
  padding-top: var(--navbar-h);
}

.dashboard-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  padding: 1.5rem 0;
  flex-shrink: 0;
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
}

.dashboard-sidebar ul {
  list-style: none;
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: 'Noto Naskh Arabic', sans-serif;
}

.sidebar-link:hover, .sidebar-link.active {
  color: var(--gold);
  background: rgba(212,175,55,0.08);
  border-right: 3px solid var(--gold);
}

.sidebar-link i { width: 18px; }

.dashboard-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dash-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dash-title i { color: var(--gold); }

/* === Dash stats overview === */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.dash-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.dash-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
}

.dash-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* === Manage List === */
.manage-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.manage-item {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.manage-item:hover { border-color: rgba(212,175,55,0.2); }

.manage-item-info { flex: 1; }

.manage-item-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.manage-item-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.manage-item-actions {
  display: flex;
  gap: 0.4rem;
}

.manage-edit-btn, .manage-delete-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Naskh Arabic', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid;
}

.manage-edit-btn {
  background: rgba(0,206,209,0.08);
  color: var(--teal);
  border-color: rgba(0,206,209,0.2);
}

.manage-edit-btn:hover { background: rgba(0,206,209,0.15); }

.manage-delete-btn {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border-color: rgba(239,68,68,0.2);
}

.manage-delete-btn:hover { background: rgba(239,68,68,0.15); }

/* === Add Form Card === */
.add-form-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.add-form-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-form-card h3 i { color: var(--gold); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-col-full { grid-column: 1 / -1; }

/* === Winner Picker in Dashboard === */
.winner-section {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* === Profile Page === */
.profile-layout {
  max-width: 700px;
  margin: 0 auto;
}

.profile-cover {
  height: 150px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(0,206,209,0.08));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--glass-border);
  border-bottom: none;
}

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1rem 2rem 2rem;
  position: relative;
}

.profile-avatar-wrap {
  position: absolute;
  top: -45px;
  right: 2rem;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #000;
  font-weight: 800;
}

.profile-info {
  padding-top: 3rem;
}

.profile-info h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.profile-grade {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* === Users List === */
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th {
  background: var(--bg-tertiary);
  padding: 0.8rem 1rem;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid var(--glass-border);
}

.users-table td {
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.users-table tr:hover td { background: var(--glass-bg); }

/* === Top Students Page === */
.top-grade-section {
  margin-bottom: 3rem;
}

.top-grade-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--glass-border);
}

.top-grade-title i {
  color: var(--gold);
  font-size: 1.5rem;
}

.top-grade-title h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.top-level-section {
  margin-bottom: 2rem;
}

.level-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: currentColor;
  border-radius: 2px;
}

.top-students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.top-student-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.top-student-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.3);
  box-shadow: var(--shadow);
}

.grade-d-card {
  border-color: rgba(212,175,55,0.4);
  background: linear-gradient(135deg, rgba(212,175,55,0.05), rgba(212,175,55,0.02));
}

.grade-m-card {
  border-color: rgba(192,192,192,0.4);
  background: linear-gradient(135deg, rgba(192,192,192,0.05), rgba(192,192,192,0.02));
}

.grade-p-card {
  border-color: rgba(176,141,87,0.4);
  background: linear-gradient(135deg, rgba(176,141,87,0.05), rgba(176,141,87,0.02));
}

.top-rank-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--gold);
  color: #000;
  font-size: 0.9rem;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

.student-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
}

.grade-badge {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid;
}

.grade-D {
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  border-color: rgba(212,175,55,0.3);
}

.grade-M {
  background: rgba(192,192,192,0.1);
  color: var(--silver);
  border-color: rgba(192,192,192,0.3);
}

.grade-P {
  background: rgba(176,141,87,0.1);
  color: #b08d57;
  border-color: rgba(176,141,87,0.3);
}

/* === Responsive Dashboard === */
@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; }
  .dashboard-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 0.5rem;
    border-left: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .dashboard-sidebar ul {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    min-width: max-content;
  }
  .sidebar-section-title { display: none; }
  .sidebar-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    white-space: nowrap;
    border-right: none !important;
  }
  .sidebar-link.active { background: rgba(212,175,55,0.15); }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .designers-grid { grid-template-columns: 1fr; }
  .dash-stats-grid { grid-template-columns: 1fr; }
  .top-students-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
