/* Children & Adolescents in AI Governance — Dashboard Theme */

:root {
    --bg-primary: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #263548;
    --border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --protection: #ef4444;
    --participation: #6366f1;
    --provision: #10b981;
    --governance: #f59e0b;
    --crosscutting: #8b5cf6;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ──────────────────────────── */
.header {
    position: sticky; top: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.header h1 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.header-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-left: 12px; }
.theme-toggle {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 1rem;
}
.theme-toggle:hover { background: var(--bg-card-hover); }

/* ── Tab Navigation ──────────────────── */
.tab-nav {
    position: sticky; top: 52px; z-index: 90;
    display: flex; gap: 4px; padding: 8px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tab-btn {
    background: transparent; border: none; color: var(--text-muted);
    padding: 8px 16px; border-radius: 6px; cursor: pointer;
    font-size: 0.82rem; font-weight: 500; white-space: nowrap;
    transition: all 0.15s;
}
.tab-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.tab-btn.active {
    background: var(--accent); color: #fff;
    box-shadow: 0 2px 6px rgba(99,102,241,0.3);
}

/* ── KPI Grid ────────────────────────── */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; padding: 16px 24px;
}
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; text-align: center;
}
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.kpi-label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ── Content ─────────────────────────── */
main { padding: 0 24px 40px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.section-title {
    font-size: 1rem; font-weight: 600; margin: 24px 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ── Chart Grids ─────────────────────── */
.chart-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 20px; margin-top: 16px; }
.chart-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 16px; }
.chart-full { margin-top: 16px; }

.chart-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow);
}
.chart-card h3 { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.chart-card .chart-subtitle { font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 12px; }

/* ── Headline Banner ─────────────────── */
.headline-banner {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin: 16px 0;
}
.headline-banner p { font-size: 0.95rem; line-height: 1.7; color: var(--text-primary); }
.headline-banner strong { color: var(--accent-light); }

/* ── Findings List ───────────────────── */
.findings-list { list-style: none; padding: 0; }
.findings-list li {
    padding: 10px 16px; margin: 6px 0;
    background: var(--bg-card); border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.82rem; color: var(--text-primary);
}

/* ── Top Statements Table ────────────── */
.stmt-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.stmt-table th {
    text-align: left; padding: 8px 12px; background: var(--bg-card);
    border-bottom: 2px solid var(--border); color: var(--text-secondary);
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.7rem;
}
.stmt-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.stmt-table tr:hover { background: var(--bg-card-hover); }
.cgi-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-weight: 600; font-size: 0.75rem;
}
.cgi-high { background: rgba(16,185,129,0.15); color: #10b981; }
.cgi-mid { background: rgba(245,158,11,0.15); color: #f59e0b; }
.cgi-low { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* ── Responsive ──────────────────────── */
@media (max-width: 768px) {
    .chart-grid-2, .chart-grid-3 { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .header { padding: 10px 16px; }
    main { padding: 0 12px 24px; }
}
