<%- include('partials/layout_start', { activePage: 'stats', pageTitle: 'Manage Stats' }) %>

<div class="admin-section">
    <% stats.forEach(stat => { %>
        <form action="/admin/stat/update" method="POST" style="margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom:15px;">
            <input type="hidden" name="id" value="<%= stat.id %>">
            <div style="display:flex; gap:15px; margin-bottom: 10px;">
                <div style="flex: 1;">
                    <label style="display: block; font-size: 12px; margin-bottom: 5px; color: #64748b;">Stat Value</label>
                    <input type="text" name="stat_value" value="<%= stat.stat_value %>" style="width:100%; padding: 8px; border: 1px solid #475569; background: #0f172a; color: #f1f5f9; border-radius: 4px;" required>
                </div>
                <div style="flex: 1;">
                    <label style="display: block; font-size: 12px; margin-bottom: 5px; color: #64748b;">Label (EN)</label>
                    <input type="text" name="label_en" value="<%= stat.label_en %>" style="width:100%; padding: 8px; border: 1px solid #475569; background: #0f172a; color: #f1f5f9; border-radius: 4px;" required>
                </div>
                <div style="flex: 1;">
                    <label style="display: block; font-size: 12px; margin-bottom: 5px; color: #64748b;">Label (BN)</label>
                    <input type="text" name="label_bn" value="<%= stat.label_bn %>" style="width:100%; padding: 8px; border: 1px solid #475569; background: #0f172a; color: #f1f5f9; border-radius: 4px;" required>
                </div>
            </div>
            <button type="submit" class="btn-primary" style="padding:8px 15px; background-color: #f59e0b; color: #1e293b; border: none; font-weight: bold; cursor: pointer; border-radius: 4px;">Save Stat</button>
        </form>
    <% }) %>
</div>

<%- include('partials/layout_end') %>
