@forelse($inquiries as $inquiry)
        <tr class="border-b border-[#d1d5db] hover:bg-[#f3f4f6] transition-colors">
            <td class="px-4 xl:px-6 py-3 md:py-4 text-black font-medium text-sm md:text-base">{{ $inquiry->name }}</td>
            <td class="px-4 xl:px-6 py-3 md:py-4 text-black text-sm md:text-base">{{ $inquiry->email }}</td>
            <td class="px-4 xl:px-6 py-3 md:py-4 text-black text-sm md:text-base">{{ $inquiry->product ? $inquiry->product->name : 'General' }}</td>
            <td class="px-4 xl:px-6 py-3 md:py-4 text-black text-sm md:text-base hidden xl:table-cell">{{ \Illuminate\Support\Str::limit($inquiry->message, 50) }}</td>
            <td class="px-4 xl:px-6 py-3 md:py-4">
                <span class="px-3 py-1 rounded-full text-xs font-semibold {{ $inquiry->status === 'pending' ? 'bg-[#fef3c7] text-[#92400e]' : 'bg-[#d1fae5] text-[#065f46]' }}">
                    {{ ucfirst($inquiry->status) }}
                </span>
            </td>
            <td class="px-4 xl:px-6 py-3 md:py-4 text-black text-sm md:text-base">{{ $inquiry->created_at->format('M d, Y') }}</td>
            <td class="px-4 xl:px-6 py-3 md:py-4">
                <div class="flex flex-wrap gap-2 md:gap-3">
                    <a href="{{ route('admin.inquiries.show', $inquiry->id) }}" class="text-black hover:text-black transition-colors font-medium text-xs md:text-sm">View</a>
                    @if($inquiry->status === 'pending')
                        <form method="POST" action="{{ route('admin.inquiries.update', $inquiry->id) }}" class="inline">
                            @csrf
                            @method('PUT')
                            <input type="hidden" name="status" value="resolved">
                            <button type="submit" class="text-black hover:text-black transition-colors font-medium text-xs md:text-sm">Mark Resolved</button>
                        </form>
                    @endif
                    <form method="POST" action="{{ route('admin.inquiries.destroy', $inquiry->id) }}" onsubmit="return confirm('Are you sure?')" class="inline">
                        @csrf
                        @method('DELETE')
                        <button type="submit" class="text-black hover:text-[#b86a4f] transition-colors font-medium text-xs md:text-sm">Delete</button>
                    </form>
                </div>
            </td>
        </tr>
    @empty
        <tr>
            <td colspan="7" class="px-4 md:px-6 py-8 md:py-12 text-center text-black text-sm md:text-base">No inquiries found.</td>
        </tr>
    @endforelse

