* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --success-color: #22c55e;
    --warning-color: #eab308;
    --danger-color: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

h1 {
    color: var(--text-primary);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background-color: var(--bg-primary);
    border-radius: 8px;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

#map {
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.color {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
}

.high { background-color: #27ae60; }
.medium { background-color: #f1c40f; }
.low { background-color: #e74c3c; }

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chart {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#recommendations-list {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ai-insights {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.school-insight {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px;
}

.recommendation-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recommendation-card h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.metric-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 8px;
}

.metric-badge.high {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.metric-badge.medium {
    background-color: rgba(234, 179, 8, 0.1);
    color: var(--warning-color);
}

.metric-badge.low {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 300px;
}

.quick-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.quick-stats h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.ml-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    padding: 20px;
}

.ml-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ml-params {
    margin: 20px 0;
}

.ml-params label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.ml-params input[type="range"] {
    width: 100%;
    margin: 8px 0;
}

.action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--secondary-color);
}

.action-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

#scenarios {
    margin-top: 20px;
}

.scenario-card {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.scenario-card h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.scenario-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.metric {
    text-align: center;
    padding: 8px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 6px;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}