@extends('layouts.admin')

@section('title', 'Create Unit')

@section('admin-content')
    <div class="page-header">
        <div>
            <h3 class="page-title">Create Unit</h3>
            <p class="text-muted mb-0">Add a new measurement unit</p>
        </div>
        <a href="{{ route('admin.units.index') }}" class="btn btn-light border shadow-sm">
            <i class="bi bi-arrow-left me-1"></i> Back to List
        </a>
    </div>

    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow-sm">
                <div class="card-body p-4">
                    <form action="{{ route('admin.units.store') }}" method="POST">
                        @csrf
                        <div class="mb-3">
                            <label class="form-label fw-bold">Unit Name</label>
                            <input type="text" name="name" class="form-control" placeholder="e.g. Kilograms" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label fw-bold">Unit Code</label>
                            <input type="text" name="code" class="form-control" placeholder="e.g. kg" required>
                        </div>

                        <button type="submit" class="btn btn-primary-gradient w-100 py-2">
                            <i class="bi bi-plus-lg me-2"></i> Create Unit
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
