<section class="section">
  <p class="eyebrow">Admin</p>
  <h1>Comenzi</h1>
  <p>Cautare si verificare comenzi, status plata si totaluri.</p>
  <div class="table-wrap">
    <table>
      <thead><tr><th>Comanda</th><th>Client</th><th>Status</th><th>Plata</th><th>Total</th><th>Items</th><th>Data</th></tr></thead>
      <tbody>
        <% orders.forEach((order) => { %>
          <tr>
            <td><strong><%= order.order_number %></strong><br><small><%= order.source || '-' %></small></td>
            <td><%= order.guest_name || '-' %><br><small><%= order.guest_email || order.user_email || '-' %></small></td>
            <td><%- include('../partials/status-badge', { status: order.status }) %></td>
            <td><%= order.payment_status %><br><small><%= order.payment_provider || '-' %></small></td>
            <td><%= Number(order.total || 0).toFixed(2) %> <%= order.currency %></td>
            <td><%= order.items_count || 0 %></td>
            <td><%= order.created_at %></td>
          </tr>
        <% }) %>
      </tbody>
    </table>
  </div>
</section>
