diff --git a/nextjs-app/components/SchoolDetailView.module.css b/nextjs-app/components/SchoolDetailView.module.css index 671c52e..a7df1ef 100644 --- a/nextjs-app/components/SchoolDetailView.module.css +++ b/nextjs-app/components/SchoolDetailView.module.css @@ -4,19 +4,19 @@ /* Header Section */ .header { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1.25rem 1.5rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .headerContent { display: flex; justify-content: space-between; align-items: flex-start; - gap: 2rem; + gap: 1.5rem; } .titleSection { @@ -24,62 +24,65 @@ } .schoolName { - font-size: 2rem; + font-size: 1.5rem; font-weight: 700; - color: var(--text-primary); - margin-bottom: 0.75rem; + color: var(--text-primary, #1a1612); + margin-bottom: 0.5rem; line-height: 1.2; + font-family: var(--font-playfair), 'Playfair Display', serif; } .meta { display: flex; flex-wrap: wrap; - gap: 1rem; - margin-bottom: 0.75rem; + gap: 0.5rem; + margin-bottom: 0.5rem; } .metaItem { - font-size: 0.9375rem; - color: var(--text-secondary); - display: flex; - align-items: center; - gap: 0.25rem; + font-size: 0.8125rem; + color: var(--text-secondary, #5c564d); + padding: 0.125rem 0.5rem; + background: var(--bg-secondary, #f3ede4); + border-radius: 3px; } .address { - font-size: 1rem; - color: var(--text-secondary); + font-size: 0.875rem; + color: var(--text-muted, #8a847a); margin: 0; } .actions { display: flex; - gap: 0.75rem; + gap: 0.5rem; + flex-shrink: 0; } .btnAdd, .btnRemove { - padding: 0.75rem 1.5rem; - font-size: 0.9375rem; - font-weight: 500; + padding: 0.5rem 1rem; + font-size: 0.8125rem; + font-weight: 600; border: none; - border-radius: var(--radius-md); + border-radius: 6px; cursor: pointer; - transition: all var(--transition); + transition: all 0.2s ease; white-space: nowrap; } .btnAdd { - background: var(--primary); + background: var(--accent-coral, #e07256); color: white; } .btnAdd:hover { - background: var(--primary-dark); + background: var(--accent-coral-dark, #c45a3f); + transform: translateY(-1px); } .btnRemove { - background: var(--success); + background: var(--accent-teal, #2d7d7d); color: white; } @@ -87,223 +90,246 @@ opacity: 0.9; } -/* Summary Section */ -.summary { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); +/* Section Title */ +.sectionTitle { + font-size: 1.125rem; + font-weight: 600; + color: var(--text-primary, #1a1612); + margin-bottom: 0.875rem; + padding-bottom: 0.5rem; + border-bottom: 2px solid var(--border-color, #e5dfd5); + font-family: var(--font-playfair), 'Playfair Display', serif; + display: flex; + align-items: center; + gap: 0.375rem; } -.sectionTitle { - font-size: 1.5rem; - font-weight: 600; - color: var(--text-primary); - margin-bottom: 1.5rem; - padding-bottom: 0.75rem; - border-bottom: 2px solid var(--border-light); +.sectionTitle::before { + content: ''; + display: inline-block; + width: 3px; + height: 1em; + background: var(--accent-coral, #e07256); + border-radius: 2px; +} + +/* Summary Section */ +.summary { + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .metricsGrid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 1rem; + grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); + gap: 0.75rem; } .metricCard { - background: var(--bg-secondary); - border: 1px solid var(--border-light); - border-radius: var(--radius-md); - padding: 1.25rem; + background: var(--bg-secondary, #f3ede4); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 6px; + padding: 0.75rem; text-align: center; } .metricLabel { - font-size: 0.875rem; - color: var(--text-secondary); - margin-bottom: 0.5rem; + font-size: 0.6875rem; + color: var(--text-muted, #8a847a); + margin-bottom: 0.25rem; font-weight: 500; + text-transform: uppercase; + letter-spacing: 0.03em; } .metricValue { - font-size: 1.75rem; + font-size: 1.25rem; font-weight: 700; - color: var(--text-primary); + color: var(--text-primary, #1a1612); display: flex; align-items: center; justify-content: center; - gap: 0.5rem; + gap: 0.25rem; } .metricTrend { - font-size: 1.25rem; - color: var(--secondary); + font-size: 1rem; + color: var(--accent-teal, #2d7d7d); } /* Charts Section */ .chartsSection { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .chartContainer { width: 100%; - height: 400px; + height: 280px; position: relative; } -/* Detailed Metrics */ +/* Detailed Metrics - Compact Grid Layout */ .detailedMetrics { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); +} + +.metricGroupsGrid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; } .metricGroup { - margin-bottom: 2rem; -} - -.metricGroup:last-child { margin-bottom: 0; } .metricGroupTitle { - font-size: 1.125rem; + font-size: 0.875rem; font-weight: 600; - color: var(--text-primary); - margin-bottom: 1rem; + color: var(--text-primary, #1a1612); + margin-bottom: 0.5rem; + padding-bottom: 0.375rem; + border-bottom: 1px solid var(--border-color, #e5dfd5); display: flex; align-items: center; - gap: 0.5rem; + gap: 0.375rem; } .metricTable { display: flex; flex-direction: column; - gap: 0.75rem; + gap: 0.375rem; } .metricRow { display: flex; justify-content: space-between; align-items: center; - padding: 0.75rem 1rem; - background: var(--bg-secondary); - border-radius: var(--radius-md); + padding: 0.375rem 0.625rem; + background: var(--bg-secondary, #f3ede4); + border-radius: 4px; } .metricName { - font-size: 0.9375rem; - color: var(--text-secondary); + font-size: 0.75rem; + color: var(--text-secondary, #5c564d); } .metricRow .metricValue { - font-size: 1rem; + font-size: 0.875rem; font-weight: 600; - color: var(--text-primary); + color: var(--accent-teal, #2d7d7d); } /* Absence Section */ .absenceSection { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .absenceGrid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - gap: 1rem; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 0.75rem; } .absenceCard { - background: var(--bg-secondary); - border: 1px solid var(--border-light); - border-radius: var(--radius-md); - padding: 1.5rem; + background: var(--bg-secondary, #f3ede4); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 6px; + padding: 0.75rem 1rem; text-align: center; } .absenceLabel { - font-size: 0.9375rem; - color: var(--text-secondary); - margin-bottom: 0.75rem; + font-size: 0.75rem; + color: var(--text-muted, #8a847a); + margin-bottom: 0.25rem; font-weight: 500; } .absenceValue { - font-size: 1.5rem; + font-size: 1.125rem; font-weight: 700; - color: var(--text-primary); + color: var(--text-primary, #1a1612); } /* Map Section */ .mapSection { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .mapContainer { width: 100%; - height: 400px; - border-radius: var(--radius-md); + height: 250px; + border-radius: 8px; overflow: hidden; - border: 1px solid var(--border-light); + border: 1px solid var(--border-color, #e5dfd5); } /* History Section */ .historySection { - background: white; - border: 1px solid var(--border-light); - border-radius: var(--radius-lg); - padding: 2rem; - margin-bottom: 2rem; - box-shadow: var(--shadow-sm); + background: var(--bg-card, white); + border: 1px solid var(--border-color, #e5dfd5); + border-radius: 10px; + padding: 1rem 1.25rem; + margin-bottom: 1rem; + box-shadow: var(--shadow-soft); } .tableWrapper { overflow-x: auto; - margin-top: 1rem; + margin-top: 0.5rem; } .dataTable { width: 100%; border-collapse: collapse; - font-size: 0.9375rem; + font-size: 0.8125rem; } .dataTable thead { - background: var(--bg-secondary); + background: var(--bg-secondary, #f3ede4); } .dataTable th { - padding: 1rem; + padding: 0.625rem 0.75rem; text-align: left; font-weight: 600; - color: var(--text-primary); - border-bottom: 2px solid var(--border-medium); + font-size: 0.6875rem; + text-transform: uppercase; + letter-spacing: 0.03em; + color: var(--text-primary, #1a1612); + border-bottom: 2px solid var(--border-color, #e5dfd5); } .dataTable td { - padding: 1rem; - border-bottom: 1px solid var(--border-light); - color: var(--text-secondary); + padding: 0.5rem 0.75rem; + border-bottom: 1px solid var(--border-color, #e5dfd5); + color: var(--text-secondary, #5c564d); } .dataTable tbody tr:last-child td { @@ -311,19 +337,19 @@ } .dataTable tbody tr:hover { - background: var(--bg-secondary); + background: var(--bg-secondary, #f3ede4); } .yearCell { font-weight: 600; - color: var(--text-primary); + color: var(--accent-gold, #c9a227); } /* Responsive Design */ @media (max-width: 768px) { .headerContent { flex-direction: column; - gap: 1.5rem; + gap: 1rem; } .actions { @@ -336,32 +362,36 @@ } .schoolName { - font-size: 1.5rem; + font-size: 1.25rem; } .meta { flex-direction: column; - gap: 0.5rem; + gap: 0.375rem; } .metricsGrid { + grid-template-columns: repeat(2, 1fr); + } + + .metricGroupsGrid { grid-template-columns: 1fr; } .chartContainer { - height: 300px; + height: 220px; } .mapContainer { - height: 300px; + height: 200px; } .dataTable { - font-size: 0.875rem; + font-size: 0.75rem; } .dataTable th, .dataTable td { - padding: 0.75rem 0.5rem; + padding: 0.5rem 0.375rem; } } diff --git a/nextjs-app/components/SchoolDetailView.tsx b/nextjs-app/components/SchoolDetailView.tsx index 0a5ec0c..fe88ffb 100644 --- a/nextjs-app/components/SchoolDetailView.tsx +++ b/nextjs-app/components/SchoolDetailView.tsx @@ -157,91 +157,92 @@ export function SchoolDetailView({ schoolInfo, yearlyData, absenceData }: School {latestResults && (

Detailed Metrics

- - {/* Reading Metrics */} -
-

📖 Reading

-
- {latestResults.reading_expected_pct !== null && ( -
- Expected Standard - {formatPercentage(latestResults.reading_expected_pct)} -
- )} - {latestResults.reading_high_pct !== null && ( -
- Higher Standard - {formatPercentage(latestResults.reading_high_pct)} -
- )} - {latestResults.reading_progress !== null && ( -
- Progress Score - {formatProgress(latestResults.reading_progress)} -
- )} - {latestResults.reading_avg_score !== null && ( -
- Average Scaled Score - {latestResults.reading_avg_score.toFixed(1)} -
- )} +
+ {/* Reading Metrics */} +
+

Reading

+
+ {latestResults.reading_expected_pct !== null && ( +
+ Expected + {formatPercentage(latestResults.reading_expected_pct)} +
+ )} + {latestResults.reading_high_pct !== null && ( +
+ Higher + {formatPercentage(latestResults.reading_high_pct)} +
+ )} + {latestResults.reading_progress !== null && ( +
+ Progress + {formatProgress(latestResults.reading_progress)} +
+ )} + {latestResults.reading_avg_score !== null && ( +
+ Avg Score + {latestResults.reading_avg_score.toFixed(1)} +
+ )} +
-
- {/* Writing Metrics */} -
-

✍️ Writing

-
- {latestResults.writing_expected_pct !== null && ( -
- Expected Standard - {formatPercentage(latestResults.writing_expected_pct)} -
- )} - {latestResults.writing_high_pct !== null && ( -
- Higher Standard - {formatPercentage(latestResults.writing_high_pct)} -
- )} - {latestResults.writing_progress !== null && ( -
- Progress Score - {formatProgress(latestResults.writing_progress)} -
- )} + {/* Writing Metrics */} +
+

Writing

+
+ {latestResults.writing_expected_pct !== null && ( +
+ Expected + {formatPercentage(latestResults.writing_expected_pct)} +
+ )} + {latestResults.writing_high_pct !== null && ( +
+ Higher + {formatPercentage(latestResults.writing_high_pct)} +
+ )} + {latestResults.writing_progress !== null && ( +
+ Progress + {formatProgress(latestResults.writing_progress)} +
+ )} +
-
- {/* Maths Metrics */} -
-

Mathematics

-
- {latestResults.maths_expected_pct !== null && ( -
- Expected Standard - {formatPercentage(latestResults.maths_expected_pct)} -
- )} - {latestResults.maths_high_pct !== null && ( -
- Higher Standard - {formatPercentage(latestResults.maths_high_pct)} -
- )} - {latestResults.maths_progress !== null && ( -
- Progress Score - {formatProgress(latestResults.maths_progress)} -
- )} - {latestResults.maths_avg_score !== null && ( -
- Average Scaled Score - {latestResults.maths_avg_score.toFixed(1)} -
- )} + {/* Maths Metrics */} +
+

Maths

+
+ {latestResults.maths_expected_pct !== null && ( +
+ Expected + {formatPercentage(latestResults.maths_expected_pct)} +
+ )} + {latestResults.maths_high_pct !== null && ( +
+ Higher + {formatPercentage(latestResults.maths_high_pct)} +
+ )} + {latestResults.maths_progress !== null && ( +
+ Progress + {formatProgress(latestResults.maths_progress)} +
+ )} + {latestResults.maths_avg_score !== null && ( +
+ Avg Score + {latestResults.maths_avg_score.toFixed(1)} +
+ )} +