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

:root {
    --primary: #00477E;
    --primary-dark: #002b4a;
    --accent: #F39C12;
    --accent-light: #fdebd0;
    --gray-bg: #F4F6F9;
    --white: #ffffff;
    --text-dark: #1E2A3A;
    --text-muted: #4a5568;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-bg);
    color: var(--text-dark);
    line-height: 1.5;
    scroll-behavior: smooth;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 2.2rem; margin-bottom: 1rem; color: var(--primary); }
h2 { font-size: 1.75rem; margin: 1.75rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--accent); display: inline-block; }
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; color: var(--primary-dark); }

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.main-grid {
    display: flex;
    gap: 2rem;
}

.sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 1.5rem;
    height: fit-content;
    background: var(--white);
    border-radius: 24px;
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-sm);
}

.content { flex: 1; min-width: 0; }

.section {
    background: var(--white);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.section:hover { box-shadow: var(--shadow-md); }

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0a5c8e 100%);
    color: white;
    border-radius: 32px;
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}
.hero h1 { color: white; margin-bottom: 0.5rem; }
.hero p { font-size: 1.1rem; opacity: 0.9; }
.hero-credit { font-size: 0.8rem; margin-top: 1rem; opacity: 0.7; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.kpi-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent);
}
.kpi-number { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.kpi-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--text-muted); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.data-table th, .data-table td {
    border: 1px solid var(--border-light);
    padding: 0.75rem;
    text-align: left;
}
.data-table th { background-color: var(--primary); color: white; font-weight: 600; }
.data-table tr:nth-child(even) { background-color: var(--gray-bg); }

.chart-container {
    margin: 1.5rem 0;
    background: var(--white);
    padding: 1rem;
    border-radius: 20px;
}
canvas { max-height: 300px; width: 100%; }

.gender-note {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: space-between;
}
.gender-note span {
    background: #eef2ff;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-item {
    background: var(--gray-bg);
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    font-weight: 500;
}

.btn-pdf {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.btn-pdf:hover { background: #e67e22; }

.footer {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-muted);
}