<!DOCTYPE html><html lang="nl"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title><%= editUser ? 'Bewerk' : 'Nieuwe' %> Gebruiker — Mek-Tech</title><link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/css/style.css"><link rel="stylesheet" href="/css/dynamic.css"><link rel="icon" href="/img/favicon.svg"><script src="https://unpkg.com/lucide@latest"></script></head><body>
<nav class="navbar"><div class="nav-inner"><a href="/" class="nav-brand"><img src="/img/logo.svg" class="nav-logo" alt="Mek-Tech"></a><div style="display:flex;align-items:center;gap:.4rem"><a href="/" class="nav-icon-btn" title="Dashboard"><i data-lucide="layout-dashboard" style="width:15px;height:15px"></i> Dashboard</a><button class="theme-toggle" id="themeToggle" onclick="toggleTheme()"></button><a href="/auth/logout" class="nav-icon-btn" style="color:var(--red)"><i data-lucide="log-out" style="width:15px;height:15px"></i> Uitloggen</a></div></div></nav>
<div class="container">
<div class="page-header"><h1><%= editUser ? 'Bewerk Gebruiker' : 'Nieuwe Gebruiker' %></h1></div>
<% if (error) { %><div class="alert alert-error"><%= error %></div><% } %>
<div class="form-card">
<form method="POST" action="<%= editUser ? '/users/' + editUser.id + '/edit' : '/users/new' %>">
<div class="form-grid">
<div class="field"><label>Gebruikersnaam</label><input type="text" name="username" value="<%= editUser ? editUser.username : '' %>" required></div>
<div class="field"><label>E-mail</label><input type="email" name="email" value="<%= editUser ? editUser.email : '' %>"></div>
<div class="field"><label>Wachtwoord</label><input type="password" name="password" <%= editUser ? 'placeholder="Laat leeg om te behouden"' : 'required' %>></div>
<div class="field"><label>Rol</label><select name="role">
<option value="admin" <%= editUser && editUser.role === 'admin' ? 'selected' : '' %>>Admin</option>
<option value="consultant" <%= editUser && editUser.role === 'consultant' ? 'selected' : '' %>>Consultant</option>
<option value="viewer" <%= editUser && editUser.role === 'viewer' ? 'selected' : '' %>>Viewer</option>
</select></div>
</div>
<div class="form-actions"><button class="btn btn-primary">Opslaan</button><a href="/users" class="btn btn-secondary">Annuleren</a></div>
</form></div></div><script src="/js/theme.js"></script><script>lucide.createIcons()</script></body></html>
