/* SPARK Mentor - Main Styles */
:root {
  --primary: #00468c;
  --primary-dark: #003366;
  --secondary: #f5be14;
  --secondary-dark: #d4a012;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --text: #1a1c1f;
  --text-light: #666;
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --border: #ddd;
  --online: #28a745;
  --offline: #999;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Navigation */
.navbar {
  background: var(--primary);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-brand a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links, .nav-user {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a, .nav-user a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.nav-links a:hover, .nav-user a:hover {
  background: rgba(255,255,255,0.1);
}

.nav-links a.active, .nav-user a.active {
  background: var(--secondary);
  color: var(--text);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-warning {
  background: var(--warning);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 5px;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 16px;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero .tagline {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 10px;
}

.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* Areas */
.areas {
  margin-bottom: 40px;
}

.areas h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary);
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}

.area-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.area-card:hover, .area-card.selected {
  border-color: var(--primary);
  background: #e8f4ff;
}

.area-card h4 {
  color: var(--primary);
  margin-bottom: 5px;
}

.area-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Cards */
.card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.card h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.card h3 {
  color: var(--primary);
  margin-bottom: 15px;
}

/* Online Mentors */
.online-mentors h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary);
}

.mentor-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.mentor-card-mini {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mentor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  flex-shrink: 0;
}

.mentor-info h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mentor-info p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.online-dot {
  width: 10px;
  height: 10px;
  background: var(--online);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.offline-dot {
  width: 10px;
  height: 10px;
  background: var(--offline);
  border-radius: 50%;
  display: inline-block;
}

.online-badge {
  width: 10px;
  height: 10px;
  background: var(--online);
  border-radius: 50%;
  display: inline-block;
}

/* Status Dots */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-online { background: var(--online); animation: pulse 2s infinite; }
.status-offline { background: var(--offline); }
.status-insession { background: var(--warning); animation: pulse 1s infinite; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-muted { background: #e9ecef; color: #6c757d; }

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
}

/* Questionnaire */
.questionnaire {
  max-width: 700px;
  margin: 0 auto;
}

.question-step {
  display: none;
}

.question-step.active {
  display: block;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  padding: 18px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-item:hover {
  border-color: var(--primary);
  background: #f8fbff;
}

.option-item.selected {
  border-color: var(--primary);
  background: #e8f4ff;
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-item.selected .option-radio {
  border-color: var(--primary);
}

.option-item.selected .option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

.question-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* Mentor List */
.mentor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.mentor-card {
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mentor-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 25px;
  color: white;
  display: flex;
  align-items: center;
  gap: 15px;
}

.mentor-card-header .mentor-avatar {
  width: 70px;
  height: 70px;
  font-size: 1.8rem;
  background: rgba(255,255,255,0.2);
}

.mentor-card-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mentor-card-body {
  padding: 25px;
}

.mentor-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.mentor-stat {
  text-align: center;
}

.mentor-stat-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary);
}

.mentor-stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

.mentor-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.skill-tag {
  background: #e8f4ff;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.mentor-card-actions {
  display: flex;
  gap: 10px;
}

/* Profile Page */
.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px;
  border-radius: 14px;
  color: white;
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  flex-shrink: 0;
}

.profile-info h1 {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.profile-role {
  background: var(--secondary);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-section {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.profile-section h3 {
  color: var(--primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.profile-item {
  display: flex;
  flex-direction: column;
}

.profile-item label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 3px;
}

.profile-item span {
  font-weight: 500;
}

/* Messages */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  min-height: 600px;
}

.conversations-list {
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
}

.conversations-header {
  padding: 20px;
  background: var(--primary);
  color: white;
}

.conversation-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: background 0.2s;
}

.conversation-item:hover, .conversation-item.active {
  background: #f0f5ff;
}

.conversation-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  flex-shrink: 0;
}

.conversation-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
}

.conversation-status.online {
  background: var(--online);
}

.conversation-status.offline {
  background: var(--offline);
}

.conversation-info {
  flex: 1;
  overflow: hidden;
}

.conversation-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.conversation-preview {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.chat-area {
  background: var(--bg-card);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-header-info h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-info p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.chat-header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 70%;
  padding: 12px 18px;
  border-radius: 18px;
}

.message.received {
  background: #f0f2f5;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.sent {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.system {
  background: #fff3cd;
  color: #856404;
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: 0.85rem;
  border-radius: 8px;
}

.message.reported {
  border: 2px solid var(--danger);
  background: #fff5f5;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 5px;
}

.chat-input {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 1rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-input button {
  border-radius: 50%;
  width: 45px;
  height: 45px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Live Chat Widget */
.live-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.chat-toggle:hover {
  transform: scale(1.05);
}

.live-chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 350px;
  height: 450px;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.live-chat-window.open {
  display: flex;
}

.live-chat-header {
  background: var(--primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-chat-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-chat-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.live-chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-chat-input {
  padding: 15px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.live-chat-input input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
}

.live-chat-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
}

/* Match Results */
.match-result {
  text-align: center;
  padding: 40px;
}

.match-result h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.match-mentor-card {
  max-width: 400px;
  margin: 0 auto 30px;
  background: var(--bg);
  border-radius: 14px;
  padding: 30px;
}

.match-mentor-card .mentor-avatar {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  margin: 0 auto 20px;
}

.match-score {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Filters */
.filters-bar {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ========================================
   Dashboard Styles
   ======================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-full {
  grid-column: 1 / -1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 5px;
}

.impact-gauge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, var(--primary) var(--percent), var(--border) var(--percent), var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  position: relative;
}

.impact-gauge-inner {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.impact-gauge-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.impact-gauge-label {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ========================================
   Session Styles
   ======================================== */

.session-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.session-tab {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 1rem;
}

.session-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.session-tab:hover {
  color: var(--primary);
}

.session-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 20px;
}

.session-date-box {
  min-width: 70px;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
}

.session-date-box .month {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.session-date-box .day {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.session-date-box .time {
  font-size: 0.8rem;
  color: var(--text-light);
}

.session-details {
  flex: 1;
}

.session-details h4 {
  margin-bottom: 4px;
}

.session-details p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================
   Leaderboard Styles
   ======================================== */

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.highlight-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-top: 4px solid var(--primary);
}

.highlight-card.gold {
  border-top-color: var(--secondary);
}

.highlight-card.green {
  border-top-color: var(--success);
}

.highlight-card.blue {
  border-top-color: var(--info);
}

.highlight-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.highlight-card .mentor-avatar {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  margin: 0 auto 10px;
}

.highlight-card h4 {
  margin-bottom: 4px;
}

.highlight-stat {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.leaderboard-table th {
  background: var(--primary);
  color: white;
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}

.leaderboard-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tr:hover {
  background: #f8fbff;
}

.rank-number {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.rank-number.gold { color: #d4a012; }
.rank-number.silver { color: #7f8c8d; }
.rank-number.bronze { color: #cd6133; }

.impact-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.impact-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}

.mentor-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mentor-cell .mentor-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
}

/* ========================================
   Badge Styles
   ======================================== */

.badge-filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.badge-filter-tab {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  background: var(--bg-card);
  color: var(--text);
}

.badge-filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.badge-filter-tab:hover {
  border-color: var(--primary);
}

.badge-summary {
  display: flex;
  gap: 30px;
  align-items: center;
  background: var(--bg-card);
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.badge-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  transition: all 0.2s;
}

.badge-card.earned {
  border-color: var(--success);
  background: #f0fff4;
}

.badge-card.in-progress {
  border-color: var(--warning);
}

.badge-card.locked {
  opacity: 0.5;
  filter: grayscale(0.5);
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.badge-card h4 {
  margin-bottom: 5px;
  color: var(--primary);
}

.badge-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.badge-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.badge-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.badge-progress-fill.complete { background: var(--success); }
.badge-progress-fill.partial { background: var(--warning); }

.badge-progress-text {
  font-size: 0.75rem;
  color: var(--text-light);
}

.badge-earned-label {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.category-section h3 {
  color: var(--primary);
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ========================================
   Admin/Moderator Panel Styles
   ======================================== */

.panel-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.panel-tab {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.95rem;
}

.panel-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.panel-tab:hover {
  color: var(--primary);
}

.panel-section {
  display: none;
}

.panel-section.active {
  display: block;
}

.panel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.panel-stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.panel-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.panel-stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 5px;
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.data-table th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.9rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: #f8fbff;
}

/* Report Cards */
.report-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.report-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.report-card.pending { border-left-color: var(--warning); }
.report-card.escalated { border-left-color: var(--danger); }
.report-card.resolved { border-left-color: var(--success); }
.report-card.reviewing { border-left-color: var(--info); }

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.report-header h4 {
  margin-bottom: 0;
}

.report-meta {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Search Bar */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Weight Sliders */
.weight-slider-group {
  margin-bottom: 15px;
}

.weight-slider-group label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.9rem;
}

.weight-slider-group input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.weight-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-card);
  border-radius: 14px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  color: var(--primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0 5px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 25px;
}

.modal-actions {
  padding: 15px 25px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Stars */
.stars {
  display: inline-flex;
  gap: 4px;
}

.star {
  font-size: 1.4rem;
  color: var(--border);
  cursor: default;
}

.star.filled {
  color: var(--secondary);
}

.star[onclick] {
  cursor: pointer;
}

.star[onclick]:hover {
  color: var(--secondary-dark);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-gap { gap: 15px; }

.loading {
  text-align: center;
  color: var(--text-light);
  padding: 40px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.empty-state p {
  margin-bottom: 15px;
}

.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

/* Page Title */
.page-title {
  margin-bottom: 25px;
}

.page-title h1 {
  color: var(--primary);
  margin-bottom: 5px;
}

.page-title p {
  color: var(--text-light);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 40px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    text-align: center;
    padding: 10px 15px;
  }

  .nav-links, .nav-user {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .nav-links a, .nav-user a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .conversations-list {
    max-height: 300px;
    overflow-y: auto;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights-grid {
    grid-template-columns: 1fr 1fr;
  }

  .badges-grid {
    grid-template-columns: 1fr 1fr;
  }

  .session-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .leaderboard-table {
    font-size: 0.85rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 12px;
  }

  .panel-tabs {
    overflow-x: auto;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .live-chat-window {
    width: calc(100vw - 40px);
    right: -10px;
  }

  .badge-summary {
    flex-direction: column;
    text-align: center;
  }

  .modal {
    max-width: 95vw;
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .badges-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
