<%- 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">Autentificare în Sistem</h2>
    </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 (typeof succes !== 'undefined' && succes && succes.length > 0) { %>
                <div class="mb-4 bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded"><%= succes %></div>
            <% } %>
            <% 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="/auth/login" method="POST" class="space-y-6">
                <div>
                    <label class="block text-sm font-medium text-gray-700">Adresă Email</label>
                    <input type="email" name="email" 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 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">
                    Conectare
                </button>
            </form>
        </div>
    </div>
</div>
<%- include('partials/footer') %>
