<div class="mb-6"><h1 class="text-2xl font-bold text-gray-900">Reports</h1><p class="text-sm text-gray-500 mt-1">Generate financial, operational, and performance reports</p></div>

<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
    <?php
    $reports = [
        ['rentroll', 'Rent Roll', 'Active leases with rent amounts, tenants, and units', 'text-blue-600 bg-blue-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"/>'],
        ['occupancy', 'Occupancy Report', 'Occupancy rates across all properties', 'text-green-600 bg-green-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>'],
        ['delinquency', 'Delinquency Report', 'Tenants with outstanding balances', 'text-red-600 bg-red-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>'],
        ['payments', 'Payment Report', 'Payment transactions for a date range', 'text-purple-600 bg-purple-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"/>'],
        ['maintenance', 'Maintenance Report', 'Maintenance requests by status and priority', 'text-orange-600 bg-orange-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>'],
        ['leaseExpiration', 'Lease Expirations', 'Leases expiring in the next 90 days', 'text-yellow-600 bg-yellow-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>'],
        ['ownerStatement', 'Owner Statement', 'Monthly income, expenses, and net for owners', 'text-indigo-600 bg-indigo-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>'],
        ['propertyPerformance', 'Property Performance', 'Revenue, expenses, and occupancy per property', 'text-teal-600 bg-teal-50', '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>'],
    ];
    foreach ($reports as [$action, $title, $desc, $color, $icon]):
    ?>
    <a href="?page=reports&action=<?= $action ?>" class="bg-white rounded-xl shadow-sm border border-gray-200 p-6 hover:shadow-md hover:border-indigo-200 transition group">
        <div class="flex items-start gap-4">
            <div class="p-3 rounded-xl <?= $color ?>"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><?= $icon ?></svg></div>
            <div><h3 class="font-semibold text-gray-900 group-hover:text-indigo-600 transition"><?= $title ?></h3><p class="text-sm text-gray-500 mt-1"><?= $desc ?></p></div>
        </div>
    </a>
    <?php endforeach; ?>
</div>

<div class="mt-8 bg-gradient-to-r from-indigo-50 to-purple-50 rounded-xl border border-indigo-100 p-6">
    <div class="flex items-center gap-3 mb-2"><svg class="w-5 h-5 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg><h3 class="font-semibold text-indigo-900">Predictive Analytics</h3><span class="text-xs px-2 py-0.5 bg-indigo-100 text-indigo-700 rounded-full font-medium">Coming Soon</span></div>
    <p class="text-sm text-indigo-700">AI-powered delinquency prediction, vacancy forecasting, rent optimization, and tenant churn analysis.</p>
</div>
