@extends('layouts.master')
@section('title', 'Add Group')

@section('content')
<div class="container mt-4">

    <div class="card-header bg-primary text-white py-3">
        <h5 class="mb-0"><i class="fas fa-chart-line me-2"></i> Add Group</h5>
    </div>


    <form action="{{ route('groups.store') }}" method="POST">
        @csrf

        <div class="row mb-4 mt-4">
            <div class="col-md-6">
                <label for="name"><strong>Group Name</strong></label>
                <input type="text" name="name" class="form-control" placeholder="Enter group name" required>
            </div>

            <div class="col-md-6">
                <label for="description"><strong>Description</strong></label>
                <textarea name="description" class="form-control" placeholder="Enter description"></textarea>
            </div>
        </div>

       <div class="row">
            <div class="col-12">
                <!-- Force button to front and add spacing -->
                <button type="submit" class="btn btn-primary" style="z-index:10; position: relative;">Save Group</button>
                <a href="{{ route('groups.index') }}" class="btn btn-secondary" style="z-index:10; position: relative;">Back</a>
            </div>
        </div>
    </form>
</div>
@endsection
