/* PracticePilot — Advanced Performance Analytics + Exam Readiness
   Intelligence 2.0 (Phase 10), mounted into the EXISTING
   [practicepilot_dashboard] page as a separate, self-contained section
   below the Preparation Dashboard module. Strongly scoped under
   .ppilot-perf-*; reuses the SAME --ppilot-* color tokens as
   preparation-dashboard.css/student-dashboard.css — no new color system
   invented. Mobile-first discipline, identical to preparation-dashboard.css:
   no fixed widths beyond the host container, cards/tables stack to a
   single column before anything can overflow horizontally, tables scroll
   WITHIN their own card (never the page). */

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

.ppilot-perf-heading { font-size: 20px; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.01em; color: var(--ppilot-navy); }

.ppilot-perf-loading, .ppilot-perf-error, .ppilot-perf-empty {
	display: flex; align-items: center; justify-content: center; text-align: center;
	padding: 36px 20px; background: #fff; border: 1px solid var(--ppilot-border);
	border-radius: 20px; margin-bottom: 20px; color: var(--ppilot-muted); font-size: 14px;
}
.ppilot-perf-error { color: var(--ppilot-danger); }

.ppilot-perf-kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.ppilot-perf-kpi {
	background: #fff; border: 1px solid var(--ppilot-border); border-radius: 16px;
	padding: 14px 10px; text-align: center; box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04);
}
.ppilot-perf-kpi-value { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; }
.ppilot-perf-kpi-label { display: block; font-size: 11px; color: var(--ppilot-muted); margin-top: 4px; }

.ppilot-perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }

.ppilot-perf-card {
	background: #fff; border: 1px solid var(--ppilot-border); border-radius: 18px;
	padding: 16px; box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04);
}
.ppilot-perf-card-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--ppilot-navy); }

/* Tables scroll within their own card only — never a page-level horizontal scroll. */
.ppilot-perf-table-wrap { width: 100%; overflow-x: auto; }
.ppilot-perf-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ppilot-perf-table th, .ppilot-perf-table td {
	text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ppilot-border); white-space: nowrap;
}
.ppilot-perf-table th { color: var(--ppilot-muted); font-weight: 600; }

.ppilot-perf-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ppilot-perf-status-strong { background: #ecfdf5; color: #047857; }
.ppilot-perf-status-developing { background: #fffbeb; color: #b45309; }
.ppilot-perf-status-needs_practice { background: #fef2f2; color: #b91c1c; }
.ppilot-perf-status-insufficient_data { background: var(--ppilot-bg); color: var(--ppilot-muted); }

.ppilot-perf-readiness-breakdown p { margin: 0 0 8px; font-size: 13px; }
.ppilot-perf-adv-metric { color: var(--ppilot-ink); }

.ppilot-perf-gap-list { margin: 0; padding-left: 18px; font-size: 13px; }
.ppilot-perf-gap-list li { margin-bottom: 6px; }

.ppilot-perf-rec-list { display: flex; flex-direction: column; gap: 10px; }
.ppilot-perf-rec-item {
	background: var(--ppilot-bg); border: 1px solid var(--ppilot-border); border-radius: 14px; padding: 12px 14px;
}
.ppilot-perf-rec-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ppilot-perf-rec-link {
	display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ppilot-navy);
	text-decoration: none; min-height: 32px; line-height: 32px;
}

@media ( max-width: 900px ) {
	.ppilot-perf-kpi-strip { grid-template-columns: repeat(2, 1fr); }
	.ppilot-perf-grid { grid-template-columns: 1fr; }
}
@media ( max-width: 480px ) {
	.ppilot-perf-wrap { margin-top: 20px; }
	.ppilot-perf-kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.ppilot-perf-card { padding: 12px; }
	.ppilot-perf-heading { font-size: 17px; }
}
