<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 New Store</h4>
                    <p class="text-muted mb-0">Register a new physical branch in the Firestore database.</p>
                </div>
                <a href="<?php echo base_url('admin/stores'); ?>" class="btn btn-outline-secondary">
                    <i class="fa-solid fa-arrow-left me-1"></i> Back to Store List
                </a>
            </div>

            <div class="card border-0 shadow-sm rounded-4">
                <div class="card-body p-4 p-md-5">
                    <form action="<?php echo base_url('admin/add_store'); ?>" method="post">
                        <div class="row g-3">
                            <div class="col-12">
                                <label class="form-label fw-semibold">Store Branch Name <span class="text-danger">*</span></label>
                                <input type="text" name="name" class="form-control form-control-lg rounded-3" placeholder="e.g. Islamabad I8 Markaz Branch" required>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label fw-semibold">Address / Street</label>
                                <input type="text" name="address" class="form-control rounded-3" placeholder="e.g. I-8 Markaz, Block B">
                            </div>

                            <div class="col-md-3">
                                <label class="form-label fw-semibold">City</label>
                                <input type="text" name="city" class="form-control rounded-3" value="Islamabad" placeholder="e.g. Islamabad">
                            </div>

                            <div class="col-md-3">
                                <label class="form-label fw-semibold">Country</label>
                                <input type="text" name="country" class="form-control rounded-3" value="Pakistan" placeholder="e.g. Pakistan">
                            </div>

                            <div class="col-md-6">
                                <label class="form-label fw-semibold">Latitude (lat)</label>
                                <input type="number" step="any" name="lat" class="form-control rounded-3" value="33.6684" placeholder="33.6684">
                            </div>

                            <div class="col-md-6">
                                <label class="form-label fw-semibold">Longitude (lng)</label>
                                <input type="number" step="any" name="lng" class="form-control rounded-3" value="73.0758" placeholder="73.0758">
                            </div>

                            <div class="col-12 mt-4">
                                <div class="form-check form-switch fs-5">
                                    <input class="form-check-input" type="checkbox" name="isActive" id="isActive" value="1" checked>
                                    <label class="form-check-label fs-6 fw-semibold ms-2" for="isActive">Set Store as Active</label>
                                </div>
                                <small class="text-muted d-block mt-1">Active stores receive automated check-in schedules and notifications.</small>
                            </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/stores'); ?>" class="btn btn-light px-4">Cancel</a>
                                <button type="submit" class="btn btn-primary px-5 fw-semibold">
                                    <i class="fa-solid fa-check me-1"></i> Save Store
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
