<% if (notifications && notifications.length) { %>
<div class="notifications-list">
  <% notifications.forEach(n => { %>
  <div class="notif-item <%= n.is_read ? '' : 'notif-unread' %>">
    <div class="notif-icon notif-<%= n.notification_type.split('_')[0] %>"><i class="bi bi-bell-fill"></i></div>
    <div class="notif-body">
      <p class="notif-title"><%= n.title %></p>
      <% if (n.message) { %><p class="notif-msg"><%= n.message %></p><% } %>
      <span class="notif-time"><%= moment(n.created_at).fromNow() %></span>
    </div>
    <% if (n.link) { %><a href="<%= n.link %>" class="notif-link-btn"><i class="bi bi-arrow-right"></i></a><% } %>
  </div>
  <% }) %>
</div>
<% } else { %>
<div class="empty-state"><i class="bi bi-bell-slash"></i><h3>No notifications</h3><p>You're all caught up!</p></div>
<% } %>
