<?php
$page_title = 'ESG / CSR Cloud';
require_once __DIR__ . '/../config.php';
if (session_status() === PHP_SESSION_NONE) { session_start(); }
if (!isset($_SESSION['admin_id'])) { redirect(SITE_URL . '/admin/login.php'); }
require_once __DIR__ . '/header.php';
?>
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
    <div>
        <h2 style="font-family:'Outfit',sans-serif; font-size:1.8rem; color:#0f172a; margin:0;"><i class="fas fa-hands-helping" style="color:#10b981; margin-right:10px;"></i>ESG / CSR Cloud</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">CSR projects, donations, volunteering, ESG scoring, carbon credits.</p>
    </div>
</div>
<div class="grid-4" style="margin-bottom:24px;">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #10b981;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">CSR BUDGET</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">₹2.4 Cr</div>
        <div style="color:#10b981; font-size:0.8rem; margin-top:5px;"><i class="fas fa-hands-helping"></i> 78% Utilized</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #3b82f6;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">ACTIVE PROJECTS</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">12</div>
        <div style="color:#3b82f6; font-size:0.8rem; margin-top:5px;"><i class="fas fa-project-diagram"></i> 5 States</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #f59e0b;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">VOLUNTEERS</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">240</div>
        <div style="color:#f59e0b; font-size:0.8rem; margin-top:5px;"><i class="fas fa-users"></i> 1,200 Hours</div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; border-top:4px solid #8b5cf6;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">ESG SCORE</div>
        <div style="font-size:1.6rem; font-weight:700; color:#0f172a;">A+</div>
        <div style="color:#8b5cf6; font-size:0.8rem; margin-top:5px;"><i class="fas fa-star"></i> Top Quartile</div>
    </div>
</div>
<div class="grid-2">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-leaf" style="color:#059669; margin-right:8px;"></i>Carbon Credits & Projects</h3>
        <div style="background:#ecfdf5; padding:15px; border-radius:8px; border:1px solid #a7f3d0; margin-bottom:15px;">
            <div style="display:flex; justify-content:space-between; margin-bottom:8px;">
                <span style="font-weight:600; color:#065f46;">Credits Earned</span>
                <span style="font-weight:bold; color:#10b981;">2,400 tCO₂e</span>
            </div>
            <div style="display:flex; justify-content:space-between; font-size:0.85rem; color:#64748b;">
                <span>Tradeable Value</span><span style="font-weight:bold;">₹48L</span>
            </div>
        </div>
        <div style="border-left:3px solid #10b981; padding-left:12px; margin-bottom:12px;">
            <div style="font-weight:600; font-size:0.9rem;">Rural Education Program</div>
            <div style="font-size:0.8rem; color:#64748b;">₹45L · 3 schools · 1,200 students</div>
        </div>
        <div style="border-left:3px solid #3b82f6; padding-left:12px; margin-bottom:12px;">
            <div style="font-weight:600; font-size:0.9rem;">Clean Water Initiative</div>
            <div style="font-size:0.8rem; color:#64748b;">₹32L · 8 villages · 4,800 beneficiaries</div>
        </div>
        <div style="border-left:3px solid #f59e0b; padding-left:12px;">
            <div style="font-weight:600; font-size:0.9rem;">Skill Development Center</div>
            <div style="font-size:0.8rem; color:#64748b;">₹28L · 2 centers · 340 youth</div>
        </div>
    </div>
    <div style="background:linear-gradient(135deg,#10b981,#059669); color:#fff; padding:25px; border-radius:12px; display:flex; flex-direction:column; justify-content:center;">
        <h3 style="margin:0 0 8px; font-size:1.2rem;"><i class="fas fa-donate"></i> Donation Transparency</h3>
        <p style="margin:0 0 15px; font-size:0.85rem; opacity:0.85;">Full audit trail for all CSR disbursements.</p>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:8px;">
            <span>Total Donated</span><span style="font-weight:bold;">₹1.87 Cr</span>
        </div>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:8px;">
            <span>Beneficiaries</span><span style="font-weight:bold;">24,800</span>
        </div>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem;">
            <span>Impact Score</span><span style="font-weight:bold;">94/100</span>
        </div>
    </div>
</div>
<?php require_once __DIR__ . '/footer.php'; ?>
