/* ===== DASHBOARD STYLES ===== */

/* --- Layout --- */
.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
  background: var(--g50);
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand svg {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.sidebar-brand svg {
  filter: drop-shadow(0 1px 2px rgba(229,161,0,.3));
}

.sidebar-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.03em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-label {
  padding: 8px 12px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--g500);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--g400);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--g200);
}

.sidebar-item.active {
  background: rgba(26,111,196,.15);
  color: #fff;
}

.sidebar-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-home {
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-home .sidebar-home-icon svg {
  width: 28px;
  height: 28px;
}

.sidebar-item .item-badge {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
}

.sidebar-item .item-badge.red {
  background: var(--red);
  color: #fff;
}

.sidebar-item .item-badge.blue {
  background: var(--blue);
  color: #fff;
}

.sidebar-item .item-badge.gold {
  background: var(--gold);
  color: #fff;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-name {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-user-role {
  color: var(--g500);
  font-size: 0.75rem;
}

.sidebar-logout-btn {
  background: none;
  border: none;
  color: var(--g500);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.sidebar-logout-btn svg { width: 18px; height: 18px; }
.sidebar-logout-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* --- Header --- */
.dash-header {
  background: #fff;
  border-bottom: 1px solid var(--g200);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-tabs {
  display: flex;
  gap: 4px;
  background: var(--g100);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.header-tab {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g500);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  border: none;
  background: none;
}

.header-tab:hover {
  color: var(--g700);
}

.header-tab.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.header-search {
  flex: 1;
  max-width: 340px;
  position: relative;
}

.header-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--g400);
}

.header-search input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  border: 1.5px solid var(--g200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--g800);
  background: var(--g50);
  outline: none;
  transition: all 0.2s;
}

.header-search input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,111,196,.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g500);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: none;
  background: none;
}

.header-icon-btn:hover {
  background: var(--g100);
  color: var(--g700);
}

/* Header profile (top-right) */
.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
}
.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.header-user-info { min-width: 0; }
.header-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.header-user-role {
  font-size: 0.6875rem;
  color: var(--g500);
}
.header-logout-btn {
  background: none;
  border: none;
  color: var(--g400);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.header-logout-btn:hover { color: var(--red); background: var(--g100); }
.header-logout-btn svg { width: 18px; height: 18px; }
@media (max-width: 768px) {
  .header-user-info { display: none; }
  .header-profile { gap: 6px; }
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.header-icon-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}

/* --- Profile Dropdown Menu --- */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--g700);
  text-align: left;
  transition: background 0.1s;
}

.profile-dropdown-item:hover {
  background: var(--g50);
}

.profile-dropdown-item-danger {
  color: var(--red, #EF4444);
}

.profile-dropdown-item-danger:hover {
  background: #FEF2F2;
}

/* --- Main Content --- */
.dash-main {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-h));
}

/* --- Page Header Row --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}

.page-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* --- Dashboard Icon Buttons (bell, gear) --- */
.dash-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--g200);
  background: #fff;
  color: var(--g500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.dash-icon-btn:hover {
  background: var(--g50);
  color: var(--blue);
  border-color: var(--blue);
}

.dash-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--red, #EF4444);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* --- Stat Cards Row --- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: none;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.5s var(--ease-out) both;
  transition: all 0.25s var(--ease-out);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #60A5FA, #1D4ED8); animation-delay: 0ms; }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #34D399, #047857); animation-delay: 60ms; }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #FBBF24, #D97706); animation-delay: 120ms; }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #A78BFA, #6D28D9); animation-delay: 180ms; }
.stat-card:nth-child(5) { background: linear-gradient(135deg, #FB923C, #C2410C); animation-delay: 240ms; }

.stat-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.stat-card::before { display: none; }

.stat-card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
}

.stat-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stat-card-label {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  margin-bottom: 2px;
  min-height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1.3;
}

.stat-card .stat-help-btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.stat-card .stat-help-btn:hover {
  background: rgba(255,255,255,0.4);
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.03em;
  margin-top: auto;
}

.stat-card-trend {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-card-trend.up { color: var(--green); }
.stat-card-trend.down { color: var(--red); }

.stat-card-trend svg {
  width: 14px;
  height: 14px;
}

.stat-card.clickable-card { cursor: pointer; }

.stat-help-btn {
  background: var(--g100);
  border: none;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--g400);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s;
}

.stat-card .stat-help-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}
.stat-help-btn svg { width: 10px; height: 10px; }
.stat-help-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.stat-card-desc {
  font-size: 0.72rem;
  color: var(--g400);
  line-height: 1.4;
  margin-top: 8px;
  font-weight: 400;
}
.stat-card.clickable-card:hover .stat-card-desc { color: var(--blue); }

/* ─── Weekly Wins + Badges Side-by-Side ─── */
.wins-badges-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 6px;
  animation: slideUp 0.5s var(--ease-out) both;
}

/* Combined Weekly Wins Card */
.weekly-wins-combined {
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.weekly-wins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 6px;
}
.weekly-wins-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--g800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.weekly-wins-header .wins-reset {
  font-size: 0.75rem;
  color: var(--teal, #0ea5a9);
  font-weight: 600;
}
.weekly-wins-chart {
  background: url('/public/Burst.png') center center / cover no-repeat;
  border: 2px solid var(--teal, #0ea5a9);
  border-radius: var(--radius-lg, 14px);
  margin: 0 10px 12px;
  padding: 16px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
/* Icon row: 3 icons across the top */
.chart-icons-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 4px;
}
.chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  cursor: pointer;
  transition: opacity 0.15s;
}
.chart-column:hover { opacity: 0.85; }
.chart-col-icon {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
.chart-col-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g700);
  margin-top: 4px;
  text-align: center;
}
/* Vertical bars area */
.chart-bars-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  width: 100%;
  flex: 1;
  min-height: 140px;
  padding: 0 8px;
  margin-top: 8px;
}
.chart-bar-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  cursor: pointer;
}
.chart-bar {
  width: 80%;
  max-width: 120px;
  min-height: 32px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  transition: height 0.8s ease;
}
.chart-bar-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--g900);
  line-height: 1;
}
.chart-bar.bar-gold  { background: #F5A623; }
.chart-bar.bar-green { background: #7BC142; }
.chart-bar.bar-coral { background: #F87171; }

/* Right-side Badges Section */
.badges-section-wrap {
  display: flex;
  flex-direction: column;
}
.badges-combined-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px;
}
.badges-combined-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--g800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.badges-combined-header h3 img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.badges-combined {
  background: #fff;
  border: 2px solid var(--g200);
  border-radius: var(--radius-lg, 16px);
  padding: 2px;
  flex: 1;
  max-height: 280px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.badges-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 2px;
  width: 100%;
  height: 100%;
}
.badge-compact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: var(--radius-md);
  transition: transform 0.15s;
  overflow: hidden;
}
.badge-compact:hover {
  transform: scale(1.05);
}
.badge-compact.locked > img {
  opacity: 0.4;
  filter: grayscale(1);
}
.badge-compact > img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.badge-lock-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-lock-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  .wins-badges-row {
    grid-template-columns: 1fr;
  }
  .badges-compact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .badge-compact > img {
    width: 90px;
    height: 90px;
  }
}
@media (max-width: 400px) {
  .badge-compact > img {
    width: 75px;
    height: 75px;
  }
  .badge-lock-overlay {
    width: 26px;
    height: 26px;
  }
}

/* ─── DASHBOARD BADGES SECTION (student dashboard) ─── */
.dashboard-badges-section {
  margin-bottom: 18px;
}
.dashboard-badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dashboard-badge-card {
  background: #fff;
  border: 2px solid var(--g200);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.dashboard-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dashboard-badge-card.locked {
  opacity: 0.5;
}
.dashboard-badge-card.locked .dashboard-badge-img-wrap > img {
  filter: grayscale(1);
  opacity: 0.5;
}
.dashboard-badge-img-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.dashboard-badge-img-wrap > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.dashboard-badge-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g700);
  line-height: 1.2;
  margin-bottom: 4px;
}
.dashboard-badge-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.dashboard-badge-status.earned {
  background: #ECFDF5;
  color: #059669;
}
.dashboard-badge-status.locked-label {
  background: var(--g100);
  color: var(--g400);
}

@media (max-width: 768px) {
  .dashboard-badge-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .dashboard-badge-img-wrap {
    width: 60px;
    height: 60px;
  }
  .dashboard-badge-name {
    font-size: 0.65rem;
  }
}
@media (max-width: 480px) {
  .dashboard-badge-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .dashboard-badge-card {
    padding: 10px 4px 8px;
  }
  .dashboard-badge-img-wrap {
    width: 52px;
    height: 52px;
  }
  .dashboard-badge-name {
    font-size: 0.6rem;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .dashboard-badge-status {
    font-size: 0.55rem;
    padding: 1px 6px;
  }
}

/* ─── WEEKLY WINS SECTION (My Reading Progress page) ─── */
.weekly-wins-section {
  margin-bottom: 24px;
}
.weekly-wins-section .weekly-wins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.weekly-wins-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--g800);
  margin: 0;
  display: flex;
  align-items: center;
}
.weekly-wins-reset {
  font-size: 0.75rem;
  color: var(--teal, #0ea5a9);
  font-weight: 600;
}
.weekly-wins-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.weekly-win-card {
  background: #fff;
  border: 2px solid var(--g200);
  border-radius: var(--radius-lg, 16px);
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.weekly-win-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.weekly-win-keys { border-color: #F5A623; background: #FFFBF0; }
.weekly-win-quizzes { border-color: #7BC142; background: #F5FFF0; }
.weekly-win-books { border-color: #F87171; background: #FFF5F5; }
.weekly-win-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  margin-bottom: 8px;
}
.weekly-win-emoji img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
}
.weekly-win-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--g800);
  line-height: 1;
  margin-bottom: 4px;
}
.weekly-win-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--g500);
}
@media (max-width: 600px) {
  .weekly-wins-cards {
    grid-template-columns: 1fr;
  }
}

/* ─── TOTAL PROGRESS SECTION ─── */
.total-progress-section {
  margin-bottom: 18px;
}

.total-progress-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--g600);
  margin: 0 0 12px 0;
}

.total-progress-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.total-progress-card {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  animation: slideUp 0.5s var(--ease-out) 320ms both;
}
.total-progress-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.total-progress-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--g700);
}

.total-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--g500);
}

.total-progress-desc {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--g400);
  line-height: 1.4;
  margin-top: 2px;
}

/* ─── RESPONSIVE: Total Progress ─── */
@media (max-width: 768px) {
  .total-progress-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .total-progress-cards {
    grid-template-columns: 1fr;
  }
}

/* ─── COMING SOON RIBBON ─── */
.book-card-coming-soon {
  pointer-events: none;
  cursor: default;
}

.book-card-cover {
  position: relative;
  overflow: hidden;
}

.coming-soon-ribbon {
  position: absolute;
  top: 32px;
  right: -34px;
  width: 200px;
  padding: 7px 0;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(45deg);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  line-height: 1.4;
}

/* ─── FAVORITE HEART BUTTON ─── */
.book-fav-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 0;
}

.book-fav-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.95);
}

.book-fav-btn:active {
  transform: scale(0.92);
}

.book-fav-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease-out);
}

.book-fav-btn.active svg {
  animation: heartPop 0.35s var(--ease-out);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ─── BOOK FILTER TOGGLE ─── */
.book-filter-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.book-filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--g200);
  background: #fff;
  color: var(--g600);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: var(--font-display);
}

.book-filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.book-filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

/* ─── FAVORITES SECTION (My Quizzes) ─── */
.favorites-section {
  margin-bottom: 28px;
}

.favorites-section .section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.favorites-section .section-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.favorites-hint {
  text-align: center;
  padding: 20px;
  color: var(--g400);
  font-size: 0.875rem;
  font-style: italic;
}

.favorites-empty-grid {
  background: var(--g50);
  border: 2px dashed var(--g200);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

@media (max-width: 480px) {
  .book-fav-btn {
    width: 28px;
    height: 28px;
    top: 6px;
    left: 6px;
  }
  .book-fav-btn svg {
    width: 15px;
    height: 15px;
  }
  .book-filter-toggle {
    gap: 4px;
  }
  .book-filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* ─── BOOK PROGRESS GRID (My Quizzes) ─── */
.book-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.book-progress-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--g200);
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  animation: slideUp 0.4s var(--ease-out) both;
}

.book-progress-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.book-progress-cover {
  position: relative;
  height: 190px;
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-progress-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-progress-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

.book-progress-cover-fallback span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g500);
  line-height: 1.4;
}

.book-completed-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.book-completed-badge {
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--green, #16a34a);
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green, #16a34a);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-progress-info {
  padding: 8px 10px 10px;
}

.book-progress-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.book-progress-status {
  font-size: 0.75rem;
  color: var(--g500);
  font-weight: 500;
}

@media (max-width: 480px) {
  .book-progress-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .book-progress-cover {
    height: 160px;
  }
}

/* --- Tables --- */
.data-table-wrap {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--sh-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--g500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--g50);
  border-bottom: 1px solid var(--g200);
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--g700);
  border-bottom: 1px solid var(--g100);
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--g50);
}

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

/* ── Analytics Skills Pills ── */
.skill-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.skill-pill--strong { background: #dcfce7; color: #15803d; }
.skill-pill--developing { background: #fef9c3; color: #a16207; }
.skill-pill--needs-support { background: #fee2e2; color: #dc2626; }
.skill-pill--struggling { background: #FFEDD5; color: #C2410C; font-weight: 700; }
.skill-pill--nodata { background: var(--g100); color: var(--g400); }
.skill-pill--loading { background: var(--g100); color: var(--g300); min-width: 48px; text-align: center; }

/* Reading Score trend arrows */
.trend-arrow { font-size: 0.7rem; margin-left: 4px; }
.trend-arrow.trend-up { color: #16a34a; }
.trend-arrow.trend-down { color: #dc2626; }
.trend-arrow.trend-stable { color: #9ca3af; }

/* Reading score cell */
.reading-score-cell { white-space: nowrap; }

/* Vocab count cell */
.vocab-count-cell { white-space: nowrap; font-size: 0.8125rem; color: var(--g600); }

/* Table header tooltips */
.th-has-tooltip { white-space: nowrap; }
.th-info { cursor: help; font-size: 0.7rem; opacity: 0.4; margin-left: 3px; vertical-align: middle; }
.th-info:hover { opacity: 1; }

/* Analytics table responsive */
.students-analytics-table th,
.students-analytics-table td { font-size: 0.8125rem; padding: 10px 12px; }
.students-analytics-table th:first-child,
.students-analytics-table td:first-child { min-width: 160px; }

/* Student cell */
.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 1.125rem;
}

.student-name {
  font-weight: 500;
  color: var(--g900);
}

.warn-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--red-l);
  color: var(--red);
  font-size: 0.6875rem;
  font-weight: 600;
}

.warn-tag svg {
  width: 12px;
  height: 12px;
}

/* Score badges */
.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.score-badge.excellent { background: var(--green-l); color: var(--green); }
.score-badge.good { background: #E8F8F0; color: #5BBF8E; }
.score-badge.fair { background: var(--gold-l); color: var(--gold-d); }
.score-badge.poor { background: var(--red-l); color: var(--red); }

/* Mini progress bar */
.mini-progress {
  width: 60px;
  height: 4px;
  background: var(--g200);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.mini-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s var(--ease-out);
}

/* Keys display */
.keys-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--gold-d);
}

.keys-display svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

/* Streak display */
.streak-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.streak-display svg {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

/* Score distribution bar */
.score-dist {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  min-width: 120px;
  background: var(--g100);
}

.score-dist-seg {
  height: 100%;
  transition: width 0.4s var(--ease-out);
}

.score-dist-seg.excellent { background: var(--green); }
.score-dist-seg.good { background: #5BBF8E; }
.score-dist-seg.fair { background: var(--gold); }
.score-dist-seg.poor { background: var(--red); }
.score-dist-seg.pending {
  background: repeating-linear-gradient(
    -45deg,
    var(--g200),
    var(--g200) 3px,
    var(--g300) 3px,
    var(--g300) 6px
  );
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill.complete {
  background: var(--green-l);
  color: var(--green);
}

.status-pill.in-progress {
  background: var(--orange-l);
  color: var(--orange);
}

.status-pill.pending {
  background: var(--orange-l);
  color: var(--orange);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.complete .status-dot { background: var(--green); }
.status-pill.in-progress .status-dot { background: var(--orange); }
.status-pill.pending .status-dot { background: var(--orange); }

/* Activity label */
.activity-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.type-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.type-label.quiz { color: var(--blue); }
.type-label.assessment { color: var(--purple); }
.type-label.challenge { color: var(--orange); }

.activity-name {
  font-weight: 500;
  color: var(--g900);
}

/* Results cell */
.results-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.results-count {
  font-size: 0.8125rem;
  color: var(--g500);
}

/* Origin badges */
.origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
}

.origin-badge svg {
  width: 12px;
  height: 12px;
}

.origin-badge.student {
  background: var(--blue-p);
  color: var(--blue);
}

.origin-badge.teacher {
  background: var(--purple-l);
  color: var(--purple);
}

/* --- Back Button --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g500);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  border: none;
  background: none;
}

.back-btn:hover {
  background: var(--g100);
  color: var(--g700);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

/* --- Detail Header Card --- */
.detail-header {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--sh-sm);
}

.detail-header-bar {
  height: 6px;
}

.detail-header-bar.quiz { background: linear-gradient(90deg, var(--blue), var(--blue-bright)); }
.detail-header-bar.assessment { background: linear-gradient(90deg, var(--purple), #A78BFA); }
.detail-header-bar.challenge { background: linear-gradient(90deg, var(--orange), #F59E0B); }

.detail-header-body {
  padding: 24px;
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.detail-header h2 {
  font-size: 1.375rem;
  margin-top: 8px;
}

.detail-header-meta {
  display: flex;
  gap: 24px;
  color: var(--g500);
  font-size: 0.875rem;
}

.detail-header-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-header-meta svg {
  width: 16px;
  height: 16px;
}

.detail-header-stats {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--g100);
}

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

.detail-stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--g900);
}

.detail-stat-label {
  font-size: 0.75rem;
  color: var(--g500);
}

/* --- Profile Header --- */
.profile-header {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--sh-sm);
}

.profile-info h2 {
  font-size: 1.375rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-meta {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  color: var(--g500);
  font-size: 0.875rem;
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Profile stat cards */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.profile-stat-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.profile-stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.profile-stat-card .stat-icon svg {
  width: 18px;
  height: 18px;
}

.profile-stat-card .stat-icon.blue { background: var(--blue-p); color: var(--blue); }
.profile-stat-card .stat-icon.green { background: var(--green-l); color: var(--green); }
.profile-stat-card .stat-icon.gold { background: var(--gold-l); color: var(--gold); }
.profile-stat-card .stat-icon.orange { background: var(--orange-l); color: var(--orange); }
.profile-stat-card .stat-icon.purple { background: var(--purple-l); color: var(--purple); }

.profile-stat-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--g900);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--g500);
  margin-top: 2px;
}

/* --- Template Cards Grid --- */
.template-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--g500);
  border: 1.5px solid var(--g200);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.filter-chip:hover {
  border-color: var(--g300);
  color: var(--g700);
}

.filter-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.template-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.template-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.template-card-bar {
  height: 4px;
}

.template-card-bar.quiz { background: var(--blue); }
.template-card-bar.assessment { background: var(--purple); }
.template-card-bar.challenge { background: var(--orange); }

.template-card-body {
  padding: 20px;
}

.template-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 6px;
  color: var(--g900);
}

.template-card p {
  font-size: 0.8125rem;
  color: var(--g500);
  line-height: 1.5;
  margin-bottom: 14px;
}

.template-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--g400);
}

.template-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.template-card-meta svg {
  width: 14px;
  height: 14px;
}

/* --- Goal Cards --- */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.goal-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 24px;
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.goal-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--g900);
}

.goal-due {
  font-size: 0.75rem;
  color: var(--g500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.goal-due svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.goal-progress {
  margin-bottom: 12px;
}

.goal-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--g100);
  border-radius: 4px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s var(--ease-out);
}

.goal-progress-fill.blue { background: var(--blue); }
.goal-progress-fill.green { background: var(--green); }
.goal-progress-fill.purple { background: var(--purple); }
.goal-progress-fill.gold { background: var(--gold); }

.goal-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.goal-current {
  font-weight: 600;
  color: var(--g900);
}

.goal-pct {
  font-weight: 600;
}

/* --- Store & Library Lists --- */
.list-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--g100);
  transition: background 0.15s;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--g50);
}

.list-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item-name {
  font-weight: 600;
  color: var(--g900);
  font-size: 1.0625rem;
}

.list-item-sub {
  font-size: 0.9rem;
  color: var(--g500);
  margin-top: 2px;
}

.list-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Award Cards --- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.award-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.award-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.award-card-icon svg {
  width: 24px;
  height: 24px;
}

.award-card-icon.gold { background: var(--gold-l); color: var(--gold); }
.award-card-icon.green { background: var(--green-l); color: var(--green); }
.award-card-icon.orange { background: var(--orange-l); color: var(--orange); }
.award-card-icon.blue { background: var(--blue-p); color: var(--blue); }

.award-card h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--g900);
}

.award-student {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.award-student-name {
  font-weight: 500;
  color: var(--g800);
  font-size: 0.875rem;
}

.award-student-score {
  font-size: 0.8125rem;
  color: var(--g500);
}

/* --- Tool Cards (AI Teaching Tools) --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.tool-card-bar {
  height: 4px;
}

.tool-card-bar.blue { background: var(--blue); }
.tool-card-bar.red { background: var(--red); }
.tool-card-bar.green { background: var(--green); }
.tool-card-bar.purple { background: var(--purple); }
.tool-card-bar.orange { background: var(--orange); }
.tool-card-bar.gold { background: var(--gold); }

.tool-card-body {
  padding: 24px;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.tool-card-icon svg {
  width: 22px;
  height: 22px;
}

.tool-card-icon.blue { background: var(--blue-p); color: var(--blue); }
.tool-card-icon.red { background: var(--red-l); color: var(--red); }
.tool-card-icon.green { background: var(--green-l); color: var(--green); }
.tool-card-icon.purple { background: var(--purple-l); color: var(--purple); }
.tool-card-icon.orange { background: var(--orange-l); color: var(--orange); }
.tool-card-icon.gold { background: var(--gold-l); color: var(--gold); }

.tool-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--g900);
}

.tool-card p {
  font-size: 0.8125rem;
  color: var(--g500);
  line-height: 1.5;
}

/* --- Info Panel --- */
.info-panel {
  background: var(--blue-p);
  border: 1px solid rgba(26,111,196,.15);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.info-panel h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-panel h4 svg {
  width: 18px;
  height: 18px;
}

.info-panel p {
  font-size: 0.875rem;
  color: var(--g600);
  line-height: 1.6;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15,43,70,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease both;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 90vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg);
  animation: scaleIn 0.25s var(--ease-out) both;
  margin: 0 auto;
}

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

.modal-header h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g400);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
}

.modal-close:hover {
  background: var(--g100);
  color: var(--g700);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 4px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.modal-info {
  background: var(--blue-p);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.8125rem;
  color: var(--g600);
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--g200);
}

/* --- 5-column stat cards --- */
.stat-cards-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* --- Interest Tags (full) --- */
.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.interest-tag.blue   { background: var(--blue-p); color: var(--blue); }
.interest-tag.green  { background: var(--green-l); color: var(--green); }
.interest-tag.purple { background: var(--purple-l); color: var(--purple); }
.interest-tag.orange { background: var(--orange-l); color: var(--orange); }
.interest-tag.gold   { background: var(--gold-l); color: var(--gold-d); }
.interest-tag.red    { background: var(--red-l); color: var(--red); }

.interest-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* --- Interest Tags (compact / table cells) --- */
.interest-tags-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.interest-tag-sm {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.interest-tag-sm.blue   { background: var(--blue-p); color: var(--blue); }
.interest-tag-sm.green  { background: var(--green-l); color: var(--green); }
.interest-tag-sm.purple { background: var(--purple-l); color: var(--purple); }
.interest-tag-sm.orange { background: var(--orange-l); color: var(--orange); }
.interest-tag-sm.gold   { background: var(--gold-l); color: var(--gold-d); }
.interest-tag-sm.red    { background: var(--red-l); color: var(--red); }

.interest-tag-more {
  font-size: 0.6875rem;
  color: var(--g400);
  font-weight: 500;
}

.interest-empty {
  font-size: 0.8125rem;
  color: var(--g400);
  font-style: italic;
}

.interest-empty-sm {
  font-size: 0.6875rem;
  color: var(--g400);
}

/* --- Personalization Badge --- */
.personalization-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--purple-l), #EDE9FE);
  color: var(--purple);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.personalization-badge svg {
  width: 12px;
  height: 12px;
}

/* --- Onboarding Wizard --- */
.onboarding-step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 6px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g200);
  transition: all 0.3s var(--ease-out);
}

.step-dot.active {
  background: var(--blue);
  width: 24px;
  border-radius: 4px;
}

.step-dot.done {
  background: var(--green);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.interest-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid var(--g200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  background: #fff;
  text-align: center;
  position: relative;
}

.interest-card:hover {
  border-color: var(--blue);
  background: var(--blue-p);
}

.interest-card.selected {
  border-color: var(--blue);
  background: var(--blue-p);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.interest-card-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.interest-card-icon svg {
  width: 16px;
  height: 16px;
}

.interest-card-icon.blue   { background: var(--blue-p); color: var(--blue); }
.interest-card-icon.green  { background: var(--green-l); color: var(--green); }
.interest-card-icon.purple { background: var(--purple-l); color: var(--purple); }
.interest-card-icon.orange { background: var(--orange-l); color: var(--orange); }
.interest-card-icon.gold   { background: var(--gold-l); color: var(--gold); }
.interest-card-icon.red    { background: var(--red-l); color: var(--red); }

.interest-card span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--g700);
}

.interest-card-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interest-card-check svg {
  width: 12px;
  height: 12px;
}

.reading-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* --- Question Comparison Cards --- */
.question-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.question-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--g200);
}

.question-card.standard {
  background: var(--g50);
}

.question-card.personalized {
  background: linear-gradient(135deg, var(--purple-l), #EDE9FE);
  border-color: rgba(124, 58, 237, 0.15);
}

.question-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.question-card-label svg {
  width: 14px;
  height: 14px;
}

.question-card.standard .question-card-label { color: var(--g500); }
.question-card.personalized .question-card-label { color: var(--purple); }

.question-card p {
  font-size: 0.875rem;
  color: var(--g700);
  line-height: 1.6;
}

.question-card-match {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  font-size: 0.75rem;
  color: var(--g500);
}

.match-bar {
  flex: 1;
  height: 6px;
  background: var(--g200);
  border-radius: 3px;
  overflow: hidden;
}

.match-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), #A78BFA);
  border-radius: 3px;
}

.match-pct {
  font-weight: 700;
  color: var(--purple);
}

/* --- Personalization Section (Assign Modal) --- */
.personalization-section {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 18px;
}

.personalization-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.personalization-header h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--g900);
}

.personalization-header h4 svg {
  width: 16px;
  height: 16px;
  color: var(--purple);
}

.personalization-desc {
  font-size: 0.8125rem;
  color: var(--g500);
  margin-bottom: 14px;
}

.personalization-student-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.personalization-student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--g100);
}

.personalization-more {
  text-align: center;
  font-size: 0.75rem;
  color: var(--g400);
  padding: 4px;
}

/* --- Preview Student Bar --- */
.preview-student-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--g50);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

/* --- Interest Profile Card (Student Profile) --- */
.interest-profile-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--sh-sm);
}

.interest-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.interest-profile-header h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--g900);
}

.interest-profile-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.interest-profile-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interest-profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.interest-profile-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--g500);
  min-width: 100px;
}

/* --- Interest CTA Card (un-onboarded) --- */
.interest-cta-card {
  background: linear-gradient(135deg, var(--purple-l), #EDE9FE);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  text-align: center;
}

.interest-cta-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.interest-cta-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--purple);
}

.interest-cta-card p {
  font-size: 0.875rem;
  color: var(--g600);
  margin-bottom: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Growth Reports --- */
.report-header-card {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--sh-sm);
}

.report-header-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}

.report-header-body {
  padding: 24px;
}

.report-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.report-header-card h2 {
  font-size: 1.375rem;
  margin-bottom: 8px;
}

.report-meta {
  display: flex;
  gap: 20px;
  color: var(--g500);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.report-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.report-meta svg {
  width: 14px;
  height: 14px;
}

.report-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .report-charts-grid {
    grid-template-columns: 1fr;
  }
}
.chart-container {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--sh-sm);
}

.chart-container h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.chart-subtitle {
  font-size: 0.8125rem;
  color: var(--g500);
  margin-bottom: 16px;
}

.svg-chart {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* --- Growth Arrows --- */
.growth-arrow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
}

.growth-arrow svg {
  width: 14px;
  height: 14px;
}

.growth-arrow.up { color: var(--green); }
.growth-arrow.down { color: var(--red); }
.growth-arrow.steady { color: var(--g400); }

/* --- Mini Chart --- */
.mini-chart {
  display: block;
}

/* --- Insight List --- */
.insight-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.insight-list li {
  font-size: 0.875rem;
  color: var(--g600);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.insight-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* --- Modal (large variant) --- */
.modal.modal-lg {
  width: 680px;
}

/* ===== QUIZ PLAYER ===== */
.quiz-player { max-width: 800px; margin: 0 auto; padding: 0 0 40px; }

/* Header */
.quiz-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--g200); margin-bottom: 28px; }
.quiz-header-left { display: flex; align-items: center; gap: 12px; }
.quiz-back-btn { background: none; border: none; cursor: pointer; color: var(--g400); padding: 6px; border-radius: var(--radius-md); transition: all .2s; }
.quiz-back-btn:hover { background: var(--g100); color: var(--g700); }
.quiz-back-btn svg { width: 20px; height: 20px; }
.quiz-book-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--g900); letter-spacing: -0.02em; }
.quiz-chapter-label { font-size: 0.8rem; color: var(--g500); }
.quiz-progress { text-align: right; min-width: 160px; }
.quiz-progress-text { font-size: 0.8rem; color: var(--g500); margin-bottom: 6px; }
.quiz-progress-bar { height: 6px; background: var(--g200); border-radius: 3px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue) 0%, #7C3AED 100%); border-radius: 3px; transition: width .4s var(--ease-out); }

/* Strategy Badge */
.quiz-strategy-badge { display: inline-flex; align-items: center; gap: 6px; background: #FEF3C7; color: #92400E; padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; margin-bottom: 16px; }
.quiz-strategy-icon { font-size: 1rem; }
.quiz-question-type-badge { display: inline-block; background: var(--g100); color: var(--g500); padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 20px; margin-left: 8px; }

/* Passage */
.quiz-passage { background: var(--g50); border-left: 4px solid var(--blue); padding: 16px 20px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; margin-bottom: 24px; }
.quiz-passage-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g400); margin-bottom: 8px; }
.quiz-passage blockquote { font-style: italic; color: var(--g700); font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* Question */
.quiz-question-text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: #000; line-height: 1.6; margin-bottom: 24px; letter-spacing: -0.01em; text-align: center; }

/* Options */
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.quiz-option { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid var(--g200); border-radius: var(--radius-lg); background: #fff; cursor: pointer; transition: all .2s; text-align: left; font-size: 0.95rem; color: var(--g700); position: relative; }
.quiz-option:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-p); }
.quiz-option.selected { border-color: var(--blue); background: var(--blue-p); color: var(--g900); }
.quiz-option.correct { border-color: #10B981; background: #ECFDF5; color: #065F46; }
.quiz-option.incorrect { border-color: #EF4444; background: #FEF2F2; color: #991B1B; }
.quiz-option.correct-reveal { border-color: #10B981; background: #ECFDF5; opacity: 0.7; }
.quiz-option:disabled { cursor: default; }
.quiz-option.disabled-wrong { opacity: 0.5; text-decoration: line-through; pointer-events: none; }
.quiz-option-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--g100); color: var(--g600); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.quiz-option.selected .quiz-option-letter { background: var(--blue); color: #fff; }
.quiz-option.correct .quiz-option-letter { background: #10B981; color: #fff; }
.quiz-option.incorrect .quiz-option-letter { background: #EF4444; color: #fff; }
.quiz-check { width: 20px; height: 20px; color: #10B981; margin-left: auto; }

/* Hint / Strategy */
.quiz-hint-area { margin-bottom: 24px; }
.quiz-hint-btn { background: none; border: 2px dashed var(--g200); color: var(--g500); padding: 10px 20px; border-radius: var(--radius-lg); cursor: pointer; font-size: 0.875rem; font-weight: 600; transition: all .2s; width: 100%; }
.quiz-hint-btn:hover { border-color: #F59E0B; color: #92400E; background: #FFFBEB; }
.quiz-strategy-card { margin-top: 12px; background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%); border: 1px solid #FDE68A; border-radius: var(--radius-lg); padding: 20px; animation: slideDown .3s var(--ease-out); }
.quiz-strategy-card-header { font-weight: 700; color: #92400E; margin-bottom: 8px; font-size: 0.95rem; }
.quiz-strategy-tip { color: #78350F; font-size: 0.9rem; line-height: 1.6; margin: 0; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Feedback */
.quiz-feedback { padding: 20px; border-radius: var(--radius-lg); margin-bottom: 24px; animation: slideDown .3s var(--ease-out); }
.quiz-feedback.correct { background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%); border: 1px solid #A7F3D0; }
.quiz-feedback.incorrect { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); border: 1px solid #FED7AA; }
.quiz-feedback-header { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.quiz-feedback.correct .quiz-feedback-header { color: #065F46; }
.quiz-feedback.incorrect .quiz-feedback-header { color: #9A3412; }
.quiz-feedback-icon { font-size: 1.1rem; }
.quiz-feedback-text { font-size: 0.9rem; line-height: 1.6; margin: 0 0 12px; }
.quiz-feedback.correct .quiz-feedback-text { color: #047857; }
.quiz-feedback.incorrect .quiz-feedback-text { color: #C2410C; }
.quiz-feedback-strategy { font-size: 0.8rem; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.08); }
.quiz-feedback.correct .quiz-feedback-strategy { color: #065F46; }
.quiz-feedback.incorrect .quiz-feedback-strategy { color: #9A3412; }

/* Footer */
.quiz-footer { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--g200); }

/* ===== VOCAB TOOLTIP ===== */
.vocab-word { position: relative; color: var(--g700, #374151); border-bottom: 2px dotted var(--purple, #7C3AED); cursor: help; transition: color .2s; }
.vocab-word:hover { color: var(--purple, #7C3AED); }
.vocab-dot { position: absolute; top: -2px; right: -4px; width: 5px; height: 5px; background: #7C3AED; border-radius: 50%; }
.vocab-word-demo { color: var(--g700, #374151); border-bottom: 2px dotted var(--purple, #7C3AED); }
.vocab-tooltip { position: fixed; z-index: 9999; background: #1E293B; color: #fff; padding: 14px 18px; border-radius: var(--radius-lg); max-width: 320px; box-shadow: 0 8px 30px rgba(0,0,0,.2); transform: translateX(-50%); font-size: 0.85rem; line-height: 1.5; pointer-events: none; }
.vocab-tooltip::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #1E293B; }
.vocab-tooltip-word { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.vocab-tooltip-pos { font-weight: 400; color: #94A3B8; font-size: 0.75rem; font-style: italic; }
.vocab-tooltip-def { color: #E2E8F0; margin-bottom: 6px; }
.vocab-tooltip-example { color: #94A3B8; font-style: italic; font-size: 0.8rem; margin-bottom: 6px; }
.vocab-tooltip-tip { color: #FDE68A; font-size: 0.8rem; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.vocab-tooltip-loading { color: #94A3B8; }

/* Contextual vocabulary — subtle style for auto-detected words */
.vocab-word-contextual {
  color: var(--g700, #374151);
  border-bottom: 1.5px dotted var(--g400, #9CA3AF);
  cursor: help;
  transition: color .2s, border-color .2s;
}
.vocab-word-contextual:hover {
  color: var(--purple, #7C3AED);
  border-bottom-color: var(--purple, #7C3AED);
}
.vocab-word-contextual .vocab-dot { display: none; }

/* Tooltip above variant (when near bottom of viewport) */
.vocab-tooltip.above::before {
  top: auto;
  bottom: -6px;
  border-top: 6px solid #1E293B;
  border-bottom: none;
}

/* Touch-friendly tap targets for mobile/tablet */
@media (max-width: 900px) {
  .vocab-word,
  .vocab-word-contextual {
    padding: 2px 1px;
    -webkit-tap-highlight-color: rgba(124, 58, 237, 0.15);
  }
  .vocab-tooltip {
    max-width: 280px;
    font-size: 0.9rem;
    padding: 16px 20px;
  }
}

/* ===== QUIZ INTRO ===== */
.quiz-intro { text-align: center; padding: 48px 24px; }
.quiz-intro-icon { font-size: 3.5rem; margin-bottom: 20px; }
.quiz-intro h2 { font-family: var(--font-display); font-size: 2.125rem; font-weight: 800; color: var(--g900); margin-bottom: 6px; letter-spacing: -0.03em; }
.quiz-intro-chapter { color: var(--g500); margin-bottom: 10px; font-size: 1.125rem; }
.quiz-intro-student { color: #7C3AED; font-weight: 600; font-size: 1.05rem; margin-bottom: 28px; }
.quiz-intro-info { display: flex; justify-content: center; gap: 40px; margin-bottom: 36px; padding: 24px; background: var(--g50); border-radius: var(--radius-xl); }
.quiz-intro-stat { text-align: center; }
.quiz-intro-stat strong { display: block; font-family: var(--font-display); font-size: 1.875rem; font-weight: 800; color: var(--g900); }
.quiz-intro-stat span { font-size: 0.875rem; color: var(--g500); text-transform: uppercase; letter-spacing: 0.05em; }
.quiz-intro-strategies { margin-bottom: 28px; }
.quiz-intro-strategies h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g400); margin-bottom: 12px; }
.quiz-intro-strategy-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.quiz-intro-strategy-item { display: flex; align-items: center; gap: 6px; background: #FEF3C7; color: #92400E; padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; }
.quiz-intro-tip { background: var(--blue-p); color: var(--blue); padding: 14px 24px; border-radius: var(--radius-lg); font-size: 1rem; margin-bottom: 32px; }

/* ===== QUIZ RESULTS ===== */
.quiz-results { padding: 32px 0; }
.quiz-results-header { text-align: center; margin-bottom: 32px; }
.quiz-results-score-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 16px; }
.quiz-results-score-ring svg { width: 120px; height: 120px; }
.quiz-results-score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.quiz-results-pct { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--g900); }
.quiz-results-fraction { font-size: 0.75rem; color: var(--g400); }
.quiz-results h2 { font-family: var(--font-display); font-size: 1.5rem; }

/* Keys Hero Block */
.quiz-results-keys-hero {
  text-align: center;
  margin: 0 0 24px;
  padding: 28px 20px 24px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FFFBEB 100%);
  border-radius: var(--radius-xl);
  border: 1px solid #FDE68A;
  position: relative;
  overflow: hidden;
}
.quiz-results-key-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 4px;
  animation: keyFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.35));
}
.quiz-results-key-count {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: #D97706;
  line-height: 1.1;
  animation: bounceIn 0.6s ease 0.3s both;
}
.quiz-results-key-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400E;
  margin-top: 2px;
}
.quiz-results-keys-sparkle {
  position: absolute;
  font-size: 1.4rem;
  animation: sparkle 1.8s ease-in-out infinite;
  pointer-events: none;
}
.quiz-results-keys-sparkle--1 { top: 14px; right: 18%; animation-delay: 0s; }
.quiz-results-keys-sparkle--2 { bottom: 16px; left: 16%; animation-delay: 0.9s; }

/* Reading Score — compact pill */
.quiz-results-reading-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 28px;
  padding: 10px 20px;
  background: var(--g50);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--g500);
  max-width: 400px;
}
.quiz-results-reading-delta {
  font-family: var(--font-display);
  font-weight: 700;
}
.quiz-results-reading-label {
  color: var(--g400);
}
.quiz-results-reading-detail {
  color: var(--g400);
  font-size: 0.8rem;
}

/* Retry indicator in breakdown */
.quiz-result-retry {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 2px;
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.15); }
  70%  { transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.2); }
}
@keyframes keyFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Reveal Answer Modal */
.quiz-reveal-modal .quiz-retry-title {
  color: #1a1a2e;
}
.quiz-reveal-answer {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  text-align: left;
}
.quiz-reveal-answer p {
  color: #166534;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}
.quiz-reveal-explanation {
  background: var(--g50, #f9fafb);
  border: 1px solid var(--g200, #e5e7eb);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--g600, #4b5563);
  line-height: 1.6;
  text-align: left;
}
.quiz-reveal-explanation strong {
  color: var(--navy);
}

/* Legacy stats — keep for backwards compat but no longer primary */
.quiz-results-stats { display: flex; justify-content: center; gap: 40px; margin-bottom: 32px; padding: 24px; background: var(--g50); border-radius: var(--radius-xl); }
.quiz-results-stat { text-align: center; }
.quiz-results-stat-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; }
.quiz-results-stat-label { font-size: 0.75rem; color: var(--g500); text-transform: uppercase; letter-spacing: 0.05em; }
.quiz-results-stat-sub { font-size: 0.8rem; color: var(--g400); margin-top: 2px; }

.quiz-results-strategies { margin-bottom: 24px; }
.quiz-results-strategies h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g400); margin-bottom: 8px; }
.quiz-results-strategy { display: inline-flex; align-items: center; gap: 6px; background: #FEF3C7; color: #92400E; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; margin-right: 6px; margin-bottom: 6px; }

.quiz-results-breakdown { margin-bottom: 32px; text-align: center; }
.quiz-results-summary {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.quiz-results-summary-correct { color: #10B981; }
.quiz-results-summary-wrong { color: #EF4444; }
.quiz-results-expand-btn {
  background: none;
  border: none;
  color: var(--primary, #4A3AA3);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: var(--radius-full, 999px);
  transition: background 0.15s;
}
.quiz-results-expand-btn:hover {
  background: var(--g100, #f3f4f6);
}
.quiz-results-detail-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  text-align: left;
  margin-top: 0;
}
.quiz-results-breakdown.expanded .quiz-results-detail-list {
  max-height: 2000px;
  margin-top: 16px;
}
.quiz-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-lg); margin-bottom: 6px; }
.quiz-result-item.correct { background: #F0FDF4; }
.quiz-result-item.incorrect { background: #FFF7ED; }
.quiz-result-icon { font-size: 1.1rem; flex-shrink: 0; }
.quiz-result-info { flex: 1; min-width: 0; }
.quiz-result-type { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g400); }
.quiz-result-text { font-size: 0.85rem; color: var(--g700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-result-strategy { font-size: 1rem; }
.quiz-results-actions { display: flex; justify-content: center; gap: 12px; }

/* --- Retry Overlay Modal --- */
.quiz-retry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.quiz-retry-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
  animation: scaleIn 0.25s ease;
}
.quiz-retry-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.quiz-retry-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.quiz-retry-message {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.quiz-retry-hint {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border: 1px solid #FED7AA;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}
.quiz-retry-hint-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9A3412;
  margin-bottom: 6px;
}
.quiz-retry-hint p {
  color: #78350F;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}
.quiz-retry-btn {
  width: 100%;
  font-size: 1rem;
  padding: 14px 24px;
}

/* ===== READING LEVEL DISPLAY ===== */
.reading-level-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 700; }
.reading-level-badge.high { background: #ECFDF5; color: #065F46; }
.reading-level-badge.mid { background: #EFF6FF; color: #1E40AF; }
.reading-level-badge.low { background: #FEF3C7; color: #92400E; }
.reading-level-badge.critical { background: #FEF2F2; color: #991B1B; }
.reading-level-bar { height: 6px; background: var(--g200); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.reading-level-fill { height: 100%; border-radius: 3px; transition: width .4s var(--ease-out); }
.lexile-display { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--g700); }
.lexile-display small { font-weight: 400; color: var(--g400); font-size: 0.75rem; }

/* ===== EXPANDED SURVEY STYLES ===== */
.survey-section { margin-bottom: 20px; }
.survey-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g400); margin-bottom: 10px; }
.survey-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 2px solid var(--g200); border-radius: var(--radius-full); font-size: 0.85rem; color: var(--g600); cursor: pointer; transition: all .2s; background: #fff; }
.survey-chip:hover { border-color: var(--blue); color: var(--blue); }
.survey-chip.selected { border-color: var(--blue); background: var(--blue-p); color: var(--blue); font-weight: 600; }
.survey-chip .chip-icon { font-size: 1rem; }
.survey-input { width: 100%; padding: 10px 14px; border: 2px solid var(--g200); border-radius: var(--radius-lg); font-size: 0.9rem; color: var(--g700); transition: border-color .2s; background: #fff; }
.survey-input:focus { outline: none; border-color: var(--blue); }
.survey-input::placeholder { color: var(--g300); }

/* --- Class Code Banner --- */
.class-code-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--blue-p) 0%, #EFF6FF 100%);
  border: 1px solid var(--blue-l);
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  margin-bottom: 20px;
}
.class-code-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.class-code-banner-icon {
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.class-code-banner-icon svg { width: 20px; height: 20px; }
.class-code-banner-label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--g800);
}
.class-code-banner-desc {
  font-size: 0.8125rem;
  color: var(--g500);
  margin-top: 2px;
}
.class-code-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.class-code-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--blue);
  background: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--blue-l);
}

/* --- Book Grid --- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.book-card {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--g150);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
}
.book-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.book-card-cover {
  width: 100%;
  height: 260px;
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.book-card-cover-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--g400);
  padding: 16px;
  text-align: center;
}
.book-card-cover-fallback svg {
  width: 48px;
  height: 48px;
  opacity: .5;
}
.book-card-cover-fallback span {
  font-size: 0.75rem;
  font-weight: 500;
}
.book-card-info {
  padding: 14px 16px 16px;
}
.book-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--g800);
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card-author {
  font-size: 0.75rem;
  color: var(--g500);
  margin: 0 0 10px;
}
.book-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--g200);
  color: var(--g500);
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

/* --- Empty State --- */
.empty-state {
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--sh-sm);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--blue-p);
  color: var(--blue);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--g900);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--g500);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* --- Getting Started Steps --- */
.getting-started-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  max-width: 440px;
  margin: 0 auto 8px;
}

.gs-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--g50);
  border-radius: var(--radius-md);
  border: 1px solid var(--g100);
}

.gs-step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-top: 2px;
}

.gs-step strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--g900);
  margin-bottom: 2px;
}

.gs-step p {
  font-size: 0.8125rem;
  color: var(--g500);
  margin: 0;
  line-height: 1.4;
}

/* --- Dashboard Help Modal (Larger) --- */
.gs-step-lg {
  padding: 18px 22px;
  gap: 18px;
}

.gs-step-lg strong {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.gs-step-lg p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.gs-step-num-lg {
  width: 36px;
  height: 36px;
  min-width: 36px;
  font-size: 1rem;
}

/* --- Store Edit Card --- */
.store-edit-card {
  animation: slideUp 0.3s var(--ease-out) both;
}

/* ─── STUDENT STORE VIEW ─── */
.student-store-balance {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  animation: slideUp 0.3s var(--ease-out) both;
}
.student-store-balance-icon {
  font-size: 2.5rem;
}
.student-store-balance-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.student-store-balance-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #78350f;
  line-height: 1.1;
}
.student-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.student-store-card {
  background: #fff;
  border: 1.5px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  animation: slideUp 0.35s var(--ease-out) both;
}
.student-store-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.student-store-card-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.student-store-card-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--g900);
}
.student-store-card-price {
  font-size: 0.875rem;
  font-weight: 600;
}
.student-store-card-stock {
  font-size: 0.75rem;
  color: var(--g500);
}
.student-store-card.insufficient {
  opacity: 0.55;
}
.student-store-card.sold-out {
  opacity: 0.4;
}
.student-store-card .w-full {
  width: 100%;
  margin-top: 4px;
}
.student-store-card-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ─── STORE SNEAK PEEK (Student Dashboard) ─── */
/* ─── Dashboard Section Headers (shared) ─── */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--g900);
  margin: 0;
}
.dash-section-title img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.dash-section-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
}
.dash-section-link:hover {
  text-decoration: underline;
}

/* ─── Store Preview Section (updated) ─── */
.store-peek-section {
  margin-top: 4px;
  margin-bottom: 12px;
}
.store-peek-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
}
.store-peek-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--g800);
}
.store-peek-title img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.store-peek-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}
.store-peek-link:hover {
  text-decoration: underline;
}
.store-peek-grid {
  display: flex;
  gap: 0;
  background: #fff;
  border: 2px solid var(--teal, #0ea5a9);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
}
.store-peek-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s;
  border-right: 1px solid var(--g150, #eee);
}
.store-peek-item:last-child {
  border-right: none;
}
.store-peek-item:hover {
  background: var(--g50, #f9fafb);
}
.store-peek-item-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.store-peek-item-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.store-peek-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  align-items: center;
  text-align: center;
}
.store-peek-item-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--g800);
  line-height: 1.3;
}
.store-peek-item-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #d97706;
  line-height: 1;
}

/* --- All Badges Page --- */
.all-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
  max-width: 900px;
}
.all-badge-card {
  background: #fff;
  border: 2px solid var(--g200);
  border-radius: 16px;
  padding: 16px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.all-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.all-badge-card.earned {
  border-color: #BBF7D0;
  background: linear-gradient(135deg, #F0FDF4, #fff);
}
.all-badge-img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.all-badge-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.all-badge-card.locked .all-badge-img-wrap > img {
  opacity: 0.4;
  filter: grayscale(1);
}
.all-badge-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.all-badge-lock img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.all-badge-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 4px;
}
.all-badge-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.all-badge-card.locked .all-badge-status {
  background: var(--g100);
  color: var(--g400);
}
.all-badge-card.earned .all-badge-status {
  background: #ECFDF5;
  color: #059669;
}

/* --- Info Tooltips --- */
.info-tip {
  position: relative;
  cursor: help;
  font-size: 0.75rem;
  margin-left: 4px;
}
.info-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--g800);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.info-tip:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--g800);
  z-index: 10;
}

/* --- Mobile Hamburger Menu --- */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--g600);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.mobile-menu-btn:hover {
  background: var(--g100);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }

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

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .sidebar.mobile-open {
    left: 0;
  }

  .dash-main {
    padding: 20px 16px;
  }

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

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

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

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

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

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

  .data-table-wrap {
    overflow-x: auto;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .interest-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .reading-style-grid {
    grid-template-columns: 1fr;
  }

  .question-comparison {
    grid-template-columns: 1fr;
  }

  .modal.modal-lg {
    width: 95vw;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .book-card-cover {
    height: 180px;
  }

  .class-code-banner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .class-code-banner-left {
    flex-direction: column;
  }

  .empty-state {
    padding: 32px 20px;
  }

  .getting-started-steps {
    max-width: 100%;
  }

  .store-edit-card > div {
    grid-template-columns: 1fr !important;
  }

  .store-peek-grid {
    grid-template-columns: 1fr;
  }

  .all-badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .all-badge-img-wrap {
    width: 80px;
    height: 80px;
  }
  .all-badge-card {
    padding: 14px 8px 10px;
  }
  .all-badge-name {
    font-size: 0.75rem;
  }
  .all-badge-lock {
    width: 36px;
    height: 36px;
  }

}

/* ===== OWNER DASHBOARD CHARTS ===== */

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--g600);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bar-chart-label {
  width: 70px;
  font-size: 0.8125rem;
  color: var(--g600);
  text-align: right;
  flex-shrink: 0;
}

.bar-chart-track {
  flex: 1;
  height: 20px;
  background: var(--g100);
  border-radius: 6px;
  overflow: hidden;
}

.bar-chart-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #60A5FA);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.bar-chart-value {
  width: 30px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
}

@media (max-width: 900px) {
  .chart-legend {
    margin-top: 12px;
  }
}

/* ---- Teacher Dashboard ---- */
.teacher-dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}
.teacher-dashboard-charts .list-card {
  display: flex;
  flex-direction: column;
}
.teacher-dashboard-charts .svg-chart-stretch {
  flex: 1;
  height: auto;
  min-height: 0;
}

.teacher-dashboard-charts .bar-chart-label {
  width: 140px;
  text-align: left;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-dashboard-charts .bar-chart-value {
  width: auto;
  min-width: 70px;
  font-size: 0.75rem;
  color: var(--g500);
  font-weight: 500;
}

.teacher-dashboard-charts .bar-chart-track {
  height: 16px;
}

.popular-book-row:hover { background: var(--g50); border-radius: 6px; }

/* Dashboard Student Roster */
.dashboard-roster { display: flex; flex-direction: column; gap: 0; }

.roster-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--g100);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
}
.roster-row:last-child { border-bottom: none; }
.roster-row:hover { background: var(--g50); }

.roster-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.roster-info { flex: 1; min-width: 0; }

.roster-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.roster-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--g500);
}
.roster-stats strong { color: var(--g700); }

.roster-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--g100);
  font-size: 0.875rem;
}

.activity-row:last-child { border-bottom: none; }

.activity-time {
  font-size: 0.75rem;
  color: var(--g400);
  min-width: 70px;
  flex-shrink: 0;
}

.activity-desc {
  flex: 1;
  color: var(--g600);
  line-height: 1.4;
}

.activity-desc strong { color: var(--navy); }
.activity-desc em { font-style: normal; color: var(--g500); }

.activity-score {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

.activity-score.green { background: #ECFDF5; color: #059669; }
.activity-score.gold { background: #FEF9C3; color: #B45309; }
.activity-score.red { background: #FEE2E2; color: #DC2626; }

.activity-keys {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}

@media (max-width: 768px) {
  .teacher-dashboard-charts {
    grid-template-columns: 1fr;
  }
  .activity-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .activity-time {
    min-width: 100%;
  }
}

/* ---- Book Completion Celebration ---- */
.celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.celebration-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 40px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.celebration-modal--cert {
  max-width: 520px;
}

.celebration-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.celebration-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.celebration-message {
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

.celebration-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.celebration-actions .btn {
  min-width: 160px;
  font-size: 1rem;
  padding: 14px 24px;
}

.celebration-dismiss {
  background: none;
  border: none;
  color: var(--g400);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 8px;
  display: block;
  margin: 0 auto;
}

.celebration-dismiss:hover {
  color: var(--g600);
}

/* Certificate Preview Card */
.celebration-cert-preview {
  margin: 0 0 24px;
  padding: 3px;
  background: linear-gradient(135deg, #4A3AA3, #8B5CF6, #C084FC, #8B5CF6, #4A3AA3);
  border-radius: 14px;
}

.celebration-cert-inner {
  background: linear-gradient(135deg, #FEFCE8 0%, #FFF7ED 50%, #FEFCE8 100%);
  border-radius: 12px;
  padding: 28px 24px 20px;
}

.celebration-cert-badge {
  font-size: 2rem;
  margin-bottom: 6px;
}

.celebration-cert-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.celebration-cert-desc {
  color: #888;
  font-size: 0.8125rem;
  margin: 2px 0;
}

.celebration-cert-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 4px 0;
}

.celebration-cert-book {
  font-size: 1.05rem;
  font-style: italic;
  color: #4A3AA3;
  font-weight: 600;
  margin: 4px 0;
}

.celebration-cert-author {
  font-size: 0.8125rem;
  color: #888;
  margin: 2px 0 10px;
}

.celebration-cert-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.75rem;
  color: #999;
  margin-top: 12px;
}

.celebration-cert-brand {
  margin-top: 14px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .celebration-modal {
    padding: 28px 20px 20px;
  }
  .celebration-cert-inner {
    padding: 20px 16px 16px;
  }
  .celebration-actions .btn {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 0.9375rem;
  }
}

/* ===== INDIVIDUAL STUDENT DASHBOARD ===== */

/* --- Loading Spinner --- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--g200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.perf-loading {
  animation: fadeIn 0.3s ease;
}

/* --- Student Overview (Score Header) --- */
.student-overview {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  animation: fadeInUp 0.4s ease;
}

.overview-score-section {
  display: flex;
  align-items: center;
  gap: 32px;
}

.overview-score-main {
  text-align: center;
  min-width: 120px;
}

.overview-score-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.03em;
}

.overview-score-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.overview-score-meta {
  flex: 1;
}

.overview-change {
  font-size: 0.9375rem;
  color: var(--g600);
  margin-bottom: 4px;
}

.overview-change-secondary {
  font-size: 0.8125rem;
  color: var(--g400);
}

.overview-trend {
  font-size: 0.8125rem;
  color: var(--g500);
  margin-bottom: 8px;
}

.overview-sparkline {
  margin-top: 4px;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* --- Score Breakdown Grid --- */
.score-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  animation: fadeInUp 0.5s ease;
}

/* --- Component Card --- */
.component-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.component-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.component-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.component-icon {
  display: flex;
  align-items: center;
}

.component-icon svg {
  width: 16px;
  height: 16px;
}

.component-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g600);
  flex: 1;
}

.component-weight {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--g400);
  background: var(--g100);
  padding: 2px 6px;
  border-radius: 4px;
}

.component-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.component-score {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.component-insight {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--g500);
  line-height: 1.4;
}

/* --- Trend Indicators --- */
.trend-up {
  color: var(--green);
  font-weight: 700;
}

.trend-down {
  color: var(--red);
  font-weight: 700;
}

.trend-stable {
  color: var(--g400);
  font-weight: 700;
}

/* --- Component Detail Panel --- */
.component-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--g150, #eee);
  animation: fadeIn 0.2s ease;
}

.detail-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.detail-row span {
  color: var(--g500);
}

.detail-row strong {
  color: var(--navy);
  font-weight: 700;
}

/* --- Score Explanation Panel --- */
.score-explain-toggle {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  font-weight: 500;
}
.score-explain-toggle:hover { text-decoration: underline; }
.score-explanation {
  animation: fadeIn 0.2s ease;
  margin-top: 16px;
}
.score-explanation-inner {
  background: #f8f9ff;
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.8125rem;
  color: var(--g700);
  line-height: 1.6;
}
.score-explanation-inner h4 { margin: 0 0 8px; color: var(--navy); font-size: 0.9375rem; }
.score-explanation-inner ul { margin: 8px 0; padding-left: 20px; }
.score-explanation-inner li { margin-bottom: 4px; }
.score-explanation-inner p { margin: 8px 0; }

/* --- Component Explanation Sections --- */
.explain-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--g150, #eee);
}
.explain-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--g500);
  margin-bottom: 4px;
}
.explain-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.75rem;
  color: var(--g600);
  line-height: 1.6;
}
.explain-list li { margin-bottom: 2px; }
.explain-note {
  margin-top: 8px;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--g500);
  padding: 6px 10px;
  background: var(--g50, #fafafa);
  border-radius: 6px;
}
.explain-focus {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #9a3412;
  line-height: 1.5;
}

/* --- Completed Books Grid (Teacher Certificate View) --- */
.completed-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  animation: fadeInUp 0.5s ease;
}
.completed-book-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--g150);
}
.completed-book-cover {
  position: relative;
  height: 120px;
  background: var(--g100);
  overflow: hidden;
}
.completed-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.completed-book-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}
.completed-book-info {
  padding: 12px;
}
.completed-book-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}
.completed-book-score {
  font-size: 0.75rem;
  color: var(--g500);
  margin-bottom: 8px;
}
.completed-book-actions {
  display: flex;
  gap: 6px;
}
.completed-book-actions .btn { font-size: 0.6875rem; padding: 4px 10px; }

/* --- Key Activity Section --- */
.key-activity-section {
  display: flex;
  gap: 20px;
  background: #fff;
  border-radius: 10px;
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  animation: fadeInUp 0.6s ease;
}

.key-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.key-stat-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.key-stat-icon svg {
  width: 20px;
  height: 20px;
}

.key-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

.key-stat-label {
  font-size: 0.75rem;
  color: var(--g400);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Responsive: Student Dashboard --- */
@media (max-width: 900px) {
  .score-breakdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-score-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .key-activity-section {
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .score-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .student-overview {
    padding: 18px 16px;
  }

  .overview-score-number {
    font-size: 2.25rem;
  }
}

/* ─── PRINT STYLES ─── */
@media print {
  /* Hide non-printable elements */
  .sidebar, .mobile-nav, .mobile-overlay, .no-print,
  .page-header-actions, .report-share-badge,
  .stat-help-btn, button, .btn {
    display: none !important;
  }

  /* Show the print logo */
  .print-logo {
    display: inline-block !important;
  }

  /* Clean page layout */
  body {
    background: #fff !important;
    margin: 0;
    padding: 0;
  }
  .dashboard {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .dash-main, .app-main {
    margin: 0 !important;
    padding: 20px !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .dash-header {
    display: none !important;
  }
  .app-layout {
    display: block !important;
  }

  /* Cards and charts */
  .stat-card, .list-card, .chart-container, .report-header-card, .data-table-wrap {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  /* Ensure SVG charts print */
  svg {
    max-width: 100% !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Report header logo */
  .report-header-card {
    margin-bottom: 16px;
  }

  /* Data table */
  .data-table {
    font-size: 0.8rem;
  }
  .data-table th, .data-table td {
    padding: 6px 8px !important;
  }

  /* Page breaks */
  .report-charts-grid {
    break-inside: avoid;
  }

  /* Colors print correctly */
  .badge, .stat-card-value, .growth-arrow {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Stat card gradient backgrounds must print */
  .stat-card {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }
  .stat-card-label, .stat-card-icon {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Report header bar gradient */
  .report-header-bar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }

  /* Info panel prints */
  .info-panel {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  /* Pie chart prints */
  .chart-container svg {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Stat card icons visible in print */
  .stat-card-icon img {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
