@extends('admin.layouts.app')

@section('content')
<div class="max-w-md mx-auto bg-white rounded-xl shadow p-6">

    <h1 class="text-2xl font-black mb-6 text-center">Tambah Admin</h1>

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

        <div>
            <label class="block font-bold mb-1">Nama</label>
            <input type="text" name="name"
                   class="w-full border rounded px-3 py-2"
                   placeholder="Nama admin" required>
        </div>

        <div>
            <label class="block font-bold mb-1">Email</label>
            <input type="email" name="email"
                   class="w-full border rounded px-3 py-2"
                   placeholder="Email admin" required>
        </div>

        <div>
            <label class="block font-bold mb-1">Password</label>
            <input type="password" name="password"
                   class="w-full border rounded px-3 py-2"
                   placeholder="Password" required>
        </div>

        <div class="flex gap-3 pt-4">
            <a href="{{ route('admin.admins.index') }}"
               class="w-1/2 text-center bg-gray-400 text-white py-2 rounded font-bold hover:bg-gray-500">
                Batal
            </a>

            <button type="submit"
                    class="w-1/2 bg-green-600 text-white py-2 rounded font-bold hover:bg-green-700">
                Simpan
            </button>
        </div>
    </form>

</div>
@endsection
