/* Community Impact Page */
.impact-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #333;
    min-height: 100vh;
}

.impact-main {
    padding: 48px 40px 64px;
}

.impact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.impact-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 40px 0;
}

/* Metric Cards */
.impact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.impact-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

.impact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.impact-card-icon.blue {
    background: #dbeafe;
}
.impact-card-icon.blue svg { stroke: #2563eb; }

.impact-card-icon.green {
    background: #dcfce7;
}
.impact-card-icon.green svg { stroke: #16a34a; }

.impact-card-icon.purple {
    background: #f3e8ff;
}
.impact-card-icon.purple svg { stroke: #7c3aed; }

.impact-card-icon.orange {
    background: #ffedd5;
}
.impact-card-icon.orange svg { stroke: #ea580c; }

.impact-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.impact-card-label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.impact-card-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.impact-card-change {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 13px;
    font-weight: 600;
}

.impact-card-change.positive {
    color: #16a34a;
}

.impact-card-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 12px;
    font-weight: 600;
    background: #2563eb;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Tabs */
.impact-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.impact-tab {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #e2e8f0;
    color: #64748b;
}

.impact-tab.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.impact-tab:hover:not(.active) {
    background: #cbd5e1;
}

/* Charts */
.impact-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.impact-chart-card {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.impact-chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.impact-chart-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
}

.impact-line-chart {
    position: relative;
}

.impact-line-chart .trend-chart {
    width: 100%;
    height: auto;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 10px;
    font-size: 12px;
    color: #64748b;
}

.impact-donut-legend {
    display: flex;
    align-items: center;
    gap: 32px;
}

.impact-donut-wrap {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.donut-chart {
    width: 100%;
    height: 100%;
}

.impact-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #475569;
}

.impact-legend li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.impact-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.impact-legend .dot.blue { background: #3b82f6; }
.impact-legend .dot.green { background: #22c55e; }
.impact-legend .dot.orange { background: #f97316; }
.impact-legend .dot.purple { background: #a855f7; }
.impact-legend .dot.gray { background: #94a3b8; }

/* Recent Impact Stories */
.impact-stories {
    background: #fff;
    padding: 32px 28px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.impact-stories h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.impact-stories-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
}

.impact-story-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.impact-story-card {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid #e5e7eb;
    border-left: 4px solid transparent;
    padding-left: 20px;
    margin-left: -20px;
}

.impact-story-card:last-child {
    border-bottom: none;
}

.impact-story-card.blue { border-left-color: #2563eb; }
.impact-story-card.green { border-left-color: #16a34a; }
.impact-story-card.purple { border-left-color: #7c3aed; }

.impact-story-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.impact-story-icon.blue {
    background: #dbeafe;
}
.impact-story-icon.blue svg { stroke: #2563eb; }

.impact-story-icon.green {
    background: #dcfce7;
}
.impact-story-icon.green svg { stroke: #16a34a; }

.impact-story-icon.purple {
    background: #f3e8ff;
}
.impact-story-icon.purple svg { stroke: #7c3aed; }

.impact-story-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.impact-story-body p {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.impact-story-body time {
    font-size: 13px;
    color: #64748b;
}

@media (max-width: 900px) {
    .impact-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .impact-cards {
        grid-template-columns: 1fr;
    }

    .impact-tabs {
        flex-wrap: wrap;
    }
}
