<div class="container-fluid py-4">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="d-flex align-items-center justify-content-between mb-4">
                <div>
                    <h4 class="fw-bold mb-1"><i class="fa-solid fa-plus-circle text-primary me-2"></i>Add Training Material</h4>
                    <p class="text-muted mb-0">Upload SOP guidelines, tutorial videos, or handbook resources.</p>
                </div>
                <a href="<?php echo base_url('admin/training_list'); ?>" class="btn btn-outline-secondary">
                    <i class="fa-solid fa-arrow-left me-1"></i> Back to Training List
                </a>
            </div>

            <div class="card border-0 shadow-sm rounded-4">
                <div class="card-body p-4 p-md-5">
                    <form onsubmit="event.preventDefault(); alert('Training material published!'); window.location.href='<?php echo base_url('admin/training_list'); ?>';">
                        <div class="row g-3">
                            <div class="col-12">
                                <label class="form-label fw-semibold">Module Title</label>
                                <input type="text" class="form-control rounded-3" placeholder="e.g. End-of-Day Deep Clean &amp; Shut Down Protocol" required>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label fw-semibold">Category</label>
                                <select class="form-select rounded-3">
                                    <option value="hygiene">Hygiene &amp; Cleanliness</option>
                                    <option value="food">Food Prep &amp; Safety</option>
                                    <option value="customer">Customer Experience</option>
                                    <option value="equipment">Equipment Maintenance</option>
                                </select>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label fw-semibold">Media Type</label>
                                <select class="form-select rounded-3">
                                    <option value="video">Video Walkthrough (MP4)</option>
                                    <option value="pdf">PDF Handbook Document</option>
                                    <option value="checklist">Step-by-step Interactive Guide</option>
                                </select>
                            </div>

                            <div class="col-12">
                                <label class="form-label fw-semibold">Resource URL / Media Link</label>
                                <input type="url" class="form-control rounded-3" placeholder="https://firebasestorage.googleapis.com/...">
                            </div>

                            <div class="col-12">
                                <label class="form-label fw-semibold">Summary &amp; Instructions</label>
                                <textarea class="form-control rounded-3" rows="4" placeholder="Describe the objectives and compliance requirements for store staff..."></textarea>
                            </div>

                            <div class="col-12 mt-4 pt-3 border-top d-flex justify-content-end gap-2">
                                <a href="<?php echo base_url('admin/training_list'); ?>" class="btn btn-light px-4">Cancel</a>
                                <button type="submit" class="btn btn-primary px-5 fw-semibold">Publish Module</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
