/* ============================================================
   styles/dashboard.css — Student & Owner Dashboards
   ============================================================ */

/* ── Layout ──────────────────────────────────────────────────── */
.dashboard-page {
  padding-top: calc(var(--navbar-h) + var(--sp-8));
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stats-grid { grid-template-columns: 1fr; } }

/* ── Stat card variants ──────────────────────────────────────── */
.stat-card.brand  { border-color: rgba(124,58,237,0.25); }
.stat-card.brand .stat-value { color: var(--brand-secondary); }
.stat-card.gold   { border-color: rgba(245,158,11,0.25); }
.stat-card.gold .stat-value  { color: var(--gold); }
.stat-card.green  { border-color: rgba(16,185,129,0.2); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.red    { border-color: rgba(239,68,68,0.2); }
.stat-card.red .stat-value   { color: var(--error); }
.stat-card[onclick] {
  cursor: pointer;
  user-select: none;
}
.stat-card[onclick]:active {
  transform: translateY(0);
}
.stat-card-link {
  font-size: var(--text-xs);
  color: var(--brand-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--t-fast);
}
.stat-card-link:hover {
  text-decoration: underline;
  color: var(--brand-primary);
}

/* ── Dashboard two-column layout ─────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-6);
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

/* ── Section ────────────────────────────────────────────────── */
.dash-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-6);
}
.dash-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.dash-section-title {
  font-size: var(--text-md); font-weight: 700;
}
.dash-section-link {
  font-size: var(--text-sm); color: var(--brand-secondary); font-weight: 500;
}

/* ── Quick actions ───────────────────────────────────────────── */
.quick-actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.owner-quick-actions {
  grid-template-columns: repeat(4, 1fr);
}
.quick-action-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  text-align: center; cursor: pointer; transition: var(--t-base);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  text-decoration: none; color: inherit;
}
@media (max-width: 900px) {
  .owner-quick-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .quick-actions, .owner-quick-actions {
    grid-template-columns: 1fr !important;
    gap: var(--sp-3);
  }
}
.quick-action-btn:hover {
  border-color: var(--border-brand); transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}
.quick-action-icon {
  width: 52px; height: 52px; border-radius: var(--r-lg);
  background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.2);
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-base);
}
.quick-action-icon svg { width: 24px; height: 24px; color: var(--brand-400); }
.quick-action-btn:hover .quick-action-icon { background: rgba(124,58,237,0.2); }
.quick-action-label { font-size: var(--text-sm); font-weight: 600; }
.quick-action-sub   { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Chart container ─────────────────────────────────────────── */
.chart-container {
  position: relative; padding: var(--sp-4) 0;
}

/* ── Activity feed ───────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-primary); margin-top: 6px; flex-shrink: 0;
}
.activity-text { font-size: var(--text-sm); flex: 1; }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── Owner queue preview ─────────────────────────────────────── */
.queue-preview-item {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border-subtle);
}
.queue-preview-item:last-child { border-bottom: none; }
.queue-preview-thumb {
  width: 48px; height: 48px; border-radius: var(--r-md);
  object-fit: cover; background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; border: 1px solid var(--border);
  overflow: hidden;
}
.queue-preview-info { flex: 1; min-width: 0; }
.queue-preview-name { font-size: var(--text-sm); font-weight: 600; }
.queue-preview-meta { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Welcome banner ─────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(168,85,247,0.08) 100%);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--r-xl); padding: var(--sp-6) var(--sp-8);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-6); margin-bottom: var(--sp-8);
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%);
}
.welcome-title { font-size: var(--text-2xl); font-weight: 800; }
.welcome-sub   { color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--sp-1); }
.welcome-emoji {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,0.15); border-radius: var(--r-xl);
  border: 1px solid rgba(124,58,237,0.2);
  flex-shrink: 0; position: relative; z-index: 1;
}
.welcome-emoji svg { width: 36px; height: 36px; color: var(--brand-400); }

@media (max-width: 600px) {
  .welcome-banner {
    flex-direction: column-reverse;
    text-align: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-4);
  }
  .welcome-banner::before { display: none; }
  .welcome-emoji { width: 56px; height: 56px; }
  .welcome-emoji svg { width: 28px; height: 28px; }
  .welcome-title { font-size: var(--text-xl); }
}
