<div class="modal-header">
    <h5 class="modal-title" id="scFilterModalLabel">
        <i class="fas fa-filter me-2"></i>Filter Standard Cost Report
    </h5>
    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form id="scFilterForm" autocomplete="off">
    <div class="modal-body">
        <div class="row">

            <!-- Part Number -->
            <div class="col-md-6 mb-3">
                <label for="scFilterPartNumber" class="form-label">Part Number</label>
                <input type="text" class="form-control" id="scFilterPartNumber"
                       name="scFilterPartNumber" placeholder="e.g. PN-1001"
                       autocomplete="off">
            </div>

            <!-- BOP Part Search -->
            <div class="col-md-6 mb-3">
                <label for="scFilterBOP" class="form-label">Bought-In Part (BOP contains)</label>
                <input type="text" class="form-control" id="scFilterBOP"
                       name="scFilterBOP" placeholder="e.g. BOLT-M8"
                       autocomplete="off">
            </div>

            <!-- Min Total Cost -->
            <div class="col-md-6 mb-3">
                <label for="scFilterMinCost" class="form-label">Min Total Cost (£)</label>
                <div class="input-group">
                    <span class="input-group-text">£</span>
                    <input type="number" class="form-control" id="scFilterMinCost"
                           name="scFilterMinCost" placeholder="0.00"
                           min="0" step="0.01" autocomplete="off">
                </div>
            </div>

            <!-- Max Total Cost -->
            <div class="col-md-6 mb-3">
                <label for="scFilterMaxCost" class="form-label">Max Total Cost (£)</label>
                <div class="input-group">
                    <span class="input-group-text">£</span>
                    <input type="number" class="form-control" id="scFilterMaxCost"
                           name="scFilterMaxCost" placeholder="9999.99"
                           min="0" step="0.01" autocomplete="off">
                </div>
            </div>

            <!-- Source filter (top-level only or all) -->
            <div class="col-md-6 mb-3">
                <label for="scFilterSource" class="form-label">Part Source</label>
                <select class="form-select select2 select2-in-sc-filter"
                        id="scFilterSource" name="scFilterSource"
                        data-dropdown-parent="#scFilterModal" style="width:100%">
                    <option value="">— All Manufactured Parts —</option>
                    <option value="top_level">Top-level only (not used in any BOM)</option>
                </select>
            </div>

        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-secondary" id="scClearFiltersBtn">
            <i class="fas fa-times me-1"></i>Clear Filters
        </button>
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
        <button type="submit" class="btn btn-custom-primary">
            <i class="fas fa-search me-1"></i>Apply Filters
        </button>
    </div>
</form>