<%- include('partials/header') %>
<div class="min-h-[70vh] flex flex-col justify-center py-12 sm:px-6 lg:px-8">
    <div class="sm:mx-auto w-full max-w-md">
        <h2 class="text-center text-3xl font-extrabold text-gray-900">Creează cont de tehnician</h2>
        <p class="text-center text-sm text-gray-500 mt-2">Ai fost invitat să te alături echipei. Completează formularul de mai jos.</p>
    </div>
    <div class="mt-8 sm:mx-auto w-full max-w-md">
        <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
            <% if (eroare && eroare.length > 0) { %>
                <div class="mb-4 bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded"><%= eroare %></div>
            <% } %>
            <form action="/invite/<%= token %>" method="POST" class="space-y-6">
                <div>
                    <label class="block text-sm font-medium text-gray-700">Nume complet</label>
                    <input type="text" name="nume" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2 focus:ring-indigo-500 focus:border-indigo-500">
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700">Adresă Email</label>
                    <input type="email" name="email" value="<%= emailInvitatie %>" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2 focus:ring-indigo-500 focus:border-indigo-500">
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700">Parolă</label>
                    <input type="password" name="parola" required minlength="6" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2 focus:ring-indigo-500 focus:border-indigo-500">
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700">Confirmă parola</label>
                    <input type="password" name="confirma_parola" required minlength="6" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2 focus:ring-indigo-500 focus:border-indigo-500">
                </div>
                <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none">
                    Creează cont
                </button>
            </form>
        </div>
    </div>
</div>
<%- include('partials/footer') %>
