/* PracticePilot — Student Dashboard 2.0 [practicepilot_dashboard]
   (§student-dashboard-2, Phase 9). Strongly scoped under .ppilot-dash-*;
   no bare/global selectors, never forces width beyond the host page's
   container, never touches global WordPress header/footer/theme styles.
   Reuses the SAME --ppilot-* color tokens already defined in
   admin/ppilot-shared.css (navy/gold accent system) for visual
   consistency across the product — no new colors invented here. This
   file is completely separate from admin/dashboard.css (the wp-admin-only
   Operations Command Center), which it never touches. */

.ppilot-dash-wrap {
	max-width: 1080px; width: 100%; margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--ppilot-ink);
}
.ppilot-dash-wrap, .ppilot-dash-wrap * { box-sizing: border-box; }

.ppilot-dash-header {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin-bottom: 22px;
}
.ppilot-dash-heading { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.ppilot-dash-bell-slot { flex-shrink: 0; }

/* Optional CTA into the Tests Catalogue — same convention/position as before. */
.ppilot-dash-explore-tests { display: inline-flex; margin-bottom: 20px; text-decoration: none; }

.ppilot-dash-loading, .ppilot-dash-error-state, .ppilot-dash-empty-state {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	padding: 48px 24px; text-align: center; background: #fff;
	border: 1px solid var(--ppilot-border); border-radius: 20px;
}

/* --- Performance summary strip ------------------------------------- */
.ppilot-dash-kpi-strip {
	display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px;
}
.ppilot-dash-kpi {
	background: #fff; border: 1px solid var(--ppilot-border); border-radius: 18px;
	padding: 18px 14px; text-align: center; min-width: 0;
	box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04);
}
.ppilot-dash-kpi-value { display: block; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.ppilot-dash-kpi-label { display: block; font-size: 12px; color: var(--ppilot-muted); margin-top: 6px; line-height: 1.2; font-weight: 500; }
.ppilot-dash-kpi-primary {
	background: linear-gradient(135deg, var(--ppilot-navy) 0%, var(--ppilot-navy-light) 100%);
	border-color: var(--ppilot-navy);
	box-shadow: 0 4px 14px rgba(30, 27, 75, 0.22);
}
.ppilot-dash-kpi-primary .ppilot-dash-kpi-value,
.ppilot-dash-kpi-primary .ppilot-dash-kpi-label { color: #fff; }
.ppilot-dash-kpi-correct .ppilot-dash-kpi-value { color: var(--ppilot-success); }
.ppilot-dash-kpi-incorrect .ppilot-dash-kpi-value { color: var(--ppilot-danger); }

/* --- Layout grid: primary column + supporting sidebar --------------- */
.ppilot-dash-main-grid {
	display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start;
}
.ppilot-dash-sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ppilot-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }

/* --- Cards ------------------------------------------------------------ */
.ppilot-dash-card {
	background: #fff; border: 1px solid var(--ppilot-border); border-radius: 20px;
	padding: 20px 22px; box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04); min-width: 0;
}
.ppilot-dash-card-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--ppilot-navy); }
.ppilot-dash-card-desc { font-size: 13px; color: var(--ppilot-muted); margin: 0 0 14px; line-height: 1.5; }
.ppilot-dash-card-cta {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0 18px; margin-top: 4px; text-decoration: none; width: 100%;
}
.ppilot-dash-section-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--ppilot-navy); }

/* --- Recent attempts --------------------------------------------------- */
.ppilot-dash-recent-list { display: flex; flex-direction: column; gap: 10px; }
.ppilot-dash-recent-item { background: var(--ppilot-bg); border: 1px solid var(--ppilot-border); border-radius: 14px; padding: 14px 16px; }
.ppilot-dash-recent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ppilot-dash-recent-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ppilot-dash-recent-title { font-weight: 600; font-size: 14px; color: var(--ppilot-ink); }
.ppilot-dash-recent-meta { font-size: 12px; color: var(--ppilot-muted); }
.ppilot-dash-recent-result-mount { margin-top: 12px; border-top: 1px solid var(--ppilot-border); padding-top: 12px; }
.ppilot-dash-recent-item .ppilot-btn-small { min-height: 44px; }

/* --- Weak areas / Mistake book teaser lists ---------------------------- */
.ppilot-dash-teaser-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ppilot-dash-teaser-row {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 10px 12px; background: var(--ppilot-bg); border-radius: 10px; font-size: 12px;
}
.ppilot-dash-teaser-name { font-weight: 600; color: var(--ppilot-ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppilot-dash-teaser-sub { color: var(--ppilot-muted); flex-shrink: 0; }
.ppilot-dash-teaser-score { color: var(--ppilot-warning); font-weight: 700; flex-shrink: 0; }

/* --- Mistake Book counts ------------------------------------------------ */
.ppilot-dash-mistake-counts { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ppilot-dash-mistake-count {
	background: var(--ppilot-warning-bg); color: var(--ppilot-warning); font-weight: 700; font-size: 12px;
	padding: 8px 12px; border-radius: 10px;
}
.ppilot-dash-mistake-count-total {
	background: var(--ppilot-bg); color: var(--ppilot-muted); font-weight: 600; font-size: 12px;
	padding: 8px 12px; border-radius: 10px;
}

/* --- Progress / streak --------------------------------------------------- */
.ppilot-dash-streak { display: flex; align-items: baseline; gap: 8px; }
.ppilot-dash-streak-value { font-size: 32px; font-weight: 800; color: var(--ppilot-gold); line-height: 1; }
.ppilot-dash-streak-label { font-size: 13px; color: var(--ppilot-muted); font-weight: 500; }

/* --- Target exam ---------------------------------------------------------- */
.ppilot-dash-target-exam-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--ppilot-ink); }

.ppilot-muted { color: var(--ppilot-muted); font-size: 13px; line-height: 1.5; }

.ppilot-dash-card-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ppilot-navy); text-decoration: none; }
.ppilot-dash-card-link:hover { text-decoration: underline; }

@media ( max-width: 900px ) {
	.ppilot-dash-main-grid { grid-template-columns: 1fr; }
}

@media ( max-width: 640px ) {
	.ppilot-dash-header { flex-wrap: wrap; }
	.ppilot-dash-kpi-strip { grid-template-columns: repeat(2, 1fr); }
	.ppilot-dash-grid { grid-template-columns: 1fr; }
	.ppilot-dash-recent-row { flex-direction: column; align-items: flex-start; }
	.ppilot-dash-card { padding: 16px 16px; border-radius: 18px; }
	.ppilot-dash-card-cta { width: 100%; }
}
