@extends('layouts.app')
@section('content')
<div class="auth-page">
    <div class="card auth-card">
        <div class="brand"><div class="logo">₦</div><div><h1>User Registration</h1><p>Registration only creates a user account</p></div></div>
        @include('partials.flash')
        <form method="POST" action="{{ route('register.post') }}" class="grid">
            @csrf
            <div class="field"><label>Full Name</label><input name="name" value="{{ old('name') }}" required></div>
            <div class="field"><label>Email</label><input type="email" name="email" value="{{ old('email') }}" required></div>
            <div class="field"><label>Phone</label><input name="phone" value="{{ old('phone') }}"></div>
            <div class="field"><label>Department</label><input name="department" value="{{ old('department') }}"></div>
            <div class="field"><label>Position</label><input name="position" value="{{ old('position') }}"></div>
            <div class="field"><label>Password</label><input type="password" name="password" required></div>
            <div class="field"><label>Confirm Password</label><input type="password" name="password_confirmation" required></div>
            <button class="btn" type="submit">Create User Account</button>
        </form>
        <p class="footer-note">Already registered? <a href="{{ route('login') }}"><strong>Login</strong></a>. This form always creates role <strong>user</strong>; it never creates admin accounts.</p>
    </div>
</div>
@endsection
