@extends('admin.ad_master')

@section('title', $title)
@section('ad_page_title', 'Create Candidate')
@section('ad_page_subtitle', 'Add candidate profile details')

@section('ad_content')
<div class="container-fluid py-4">
    <div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3 mb-4">
        <div>
            <h1 class="h3 mb-1">Create Candidate</h1>
            <p class="text-muted mb-0">Add candidate profile details</p>
        </div>
        <a href="{{ route('admin.candidates.index') }}" class="btn btn-light border">Back</a>
    </div>

    @if($errors->any())
        <div class="alert alert-danger">
            <ul class="mb-0 ps-3">
                @foreach($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <div class="card shadow-sm border-0">
        <div class="card-body p-4">
            <form action="{{ route('admin.candidates.store') }}" method="POST" enctype="multipart/form-data">
                @include('admin.candidates.partials.form', ['submitButtonText' => 'Create'])
            </form>
        </div>
    </div>
</div>
@endsection

