/* ============================================================
   TeachMe Now — Home Dashboard Styles
   ============================================================ */

/* ── Greeting header ────────────────────────────────────── */
.home-greeting {
  margin-bottom: var(--sp-6);
  animation: fadeUp .6s var(--ease-out) both;
}
.home-greeting-label {
  font-size: .82rem; color: var(--txt-muted); font-weight: 500;
  margin-bottom: 2px;
}
.home-greeting-name {
  font-size: 1.5rem; font-weight: 900; color: var(--txt-primary);
}
.home-greeting-name span { color: var(--clr-accent-blue); }

/* ── Stats grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4);
  margin-bottom: var(--sp-7);
  animation: fadeUp .6s var(--ease-out) .08s both;
}
.stats-grid .stat-card:first-child {
  grid-column: 1 / -1;
}

/* ── Grade banner ───────────────────────────────────────── */
.grade-banner {
  background: linear-gradient(135deg, rgba(26,111,212,.3), rgba(0,212,170,.2));
  border: 1px solid rgba(56,182,255,.25);
  border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-5);
  overflow: hidden; position: relative;
}
.grade-banner::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse at top right, rgba(56,182,255,.12), transparent 60%);
  pointer-events: none;
}
.grade-ring-wrap { flex-shrink: 0; }
.grade-info { flex: 1; }
.grade-title {
  font-size: .78rem; color: var(--txt-secondary); font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--sp-1);
}
.grade-value {
  font-size: 2.4rem; font-weight: 900; color: var(--txt-primary);
  line-height: 1;
}
.grade-sub { font-size: .82rem; color: var(--txt-muted); margin-top: var(--sp-1); }

/* ── Attendance cards ───────────────────────────────────── */
.attend-card {
  --card-glow: rgba(56,182,255,.18);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.attend-bar-track {
  height: 6px; background: rgba(255,255,255,.08);
  border-radius: var(--r-full); overflow: hidden;
}
.attend-bar-fill {
  height: 100%; border-radius: var(--r-full);
  transition: width 1s var(--ease-out);
}
.attend-bar-fill.present { background: linear-gradient(to right, #22c55e, #4ade80); }
.attend-bar-fill.absent  { background: linear-gradient(to right, #ef4444, #f87171); }

/* ── Subscribed courses ─────────────────────────────────── */
.subscribed-section {
  animation: fadeUp .6s var(--ease-out) .18s both;
}
.course-scroll-item {
  width: 220px;
}
.mini-course-card {
  width: 220px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl); overflow: hidden; cursor: pointer;
  transition: all var(--dur-mid) var(--ease-out);
  flex-shrink: 0;
}
.mini-course-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-glow);
  border-color: rgba(56,182,255,.30);
}
.mini-course-thumb {
  width: 100%; height: 110px; object-fit: cover;
}
.mini-course-thumb-ph {
  width: 100%; height: 110px;
  display: flex; align-items: center; justify-content: center;
}
.mini-course-body { padding: var(--sp-3) var(--sp-4); }
.mini-course-title {
  font-size: .88rem; font-weight: 700; color: var(--txt-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: var(--sp-2);
}
.mini-progress-bar {
  height: 4px; background: rgba(255,255,255,.08);
  border-radius: var(--r-full); overflow: hidden; margin-bottom: 4px;
}
.mini-progress-fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(to right, var(--clr-accent-blue), var(--clr-accent-teal));
}
.mini-progress-label { font-size: .72rem; color: var(--txt-muted); }

/* ── Quick actions ──────────────────────────────────────── */
.quick-actions {
  display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-3);
  margin-bottom: var(--sp-7);
  animation: fadeUp .6s var(--ease-out) .12s both;
}
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-2);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); cursor: pointer;
  transition: all var(--dur-mid) var(--ease-out);
  color: var(--txt-secondary);
}
.quick-action-btn:hover {
  border-color: rgba(56,182,255,.35);
  background: rgba(56,182,255,.06);
  color: var(--clr-accent-blue);
  transform: translateY(-2px);
}
.qa-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.qa-label { font-size: .7rem; font-weight: 600; text-align: center; }

/* ── Notification preview ───────────────────────────────── */
.notif-item {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); cursor: pointer;
  transition: all var(--dur-fast);
}
.notif-item:hover { background: var(--glass-hover); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clr-accent-blue); flex-shrink: 0;
  margin-top: 6px;
}
.notif-dot.read { background: var(--txt-muted); }
.notif-text { flex: 1; font-size: .88rem; color: var(--txt-primary); line-height: 1.5; }
.notif-time { font-size: .72rem; color: var(--txt-muted); flex-shrink: 0; }

/* ── My mistakes teaser ─────────────────────────────────── */
.mistakes-banner {
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(234,88,12,.08));
  border: 1px solid rgba(239,68,68,.20);
  border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-5);
  cursor: pointer; transition: all var(--dur-mid);
  animation: fadeUp .6s var(--ease-out) .22s both;
}
.mistakes-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(239,68,68,.15); }
.mistakes-icon-wrap {
  width: 52px; height: 52px; border-radius: var(--r-lg); flex-shrink: 0;
  background: rgba(239,68,68,.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-danger);
}
.mistakes-info { flex: 1; }
.mistakes-title { font-size: 1rem; font-weight: 800; color: var(--txt-primary); }
.mistakes-sub { font-size: .82rem; color: var(--txt-secondary); margin-top: 2px; }
.mistakes-count {
  font-size: 1.8rem; font-weight: 900; color: var(--clr-danger);
  flex-shrink: 0;
}
