<x-app-layout>
    <div class="py-12">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6 text-gray-900">
					<h1 class="text-2xl font-bold mb-4">Add Subject</h1>

					@if ($errors->any())
						<div class="bg-red-100 text-red-800 p-3 rounded mb-4">
							<ul>
								@foreach ($errors->all() as $error)
									<li>{{ $error }}</li>
								@endforeach
							</ul>
						</div>
					@endif

					<form action="{{ route('admin.subjects.store') }}" method="POST" class="space-y-6">
						@csrf

						<div>
							<label for="name" class="block font-medium text-sm text-gray-700">Subject Name</label>
							<input id="name" type="text" name="name" class="form-input mt-1 block w-full"
								value="{{ old('name') }}" required />
						</div>

						<div>
							<button type="submit"
								class="px-4 py-2 bg-gray-200 border border-gray-300 rounded-md
									   font-semibold text-sm text-black hover:bg-gray-300
									   focus:outline-none focus:ring focus:ring-gray-400 transition">
								Save
							</button>
						</div>
					</form>
                </div>
            </div>
        </div>
    </div>
</x-app-layout>